IT. Expert System.

Android Reference

DigestInputStreamTest


org.apache.harmony.security.tests.java.security

Class DigestInputStreamTest

  • java.lang.Object
    • TestCase
      • org.apache.harmony.security.tests.java.security.DigestInputStreamTest


  • public class DigestInputStreamTest
    extends TestCase
    Tests for fields and methods of class DigestInputStream
    • Method Summary

      Methods
      Modifier and Type Method and Description
      void testDigestInputStream01()
      Test #1 for DigestInputStream constructor
      Assertion: creates new DigestInputStream instance using valid parameters (both non null)
      void testDigestInputStream02()
      Test #2 for DigestInputStream constructor
      Assertion: creates new DigestInputStream instance using valid parameters (both null)
      void testGetMessageDigest()
      Test for getMessageDigest() method
      Assertion: returns associated message digest
      void testOn()
      Test for on() method
      Assertion: turns digest functionality on or off
      void testRead01()
      Test #1 for read() method
      Assertion: returns the byte read
      Assertion: updates associated digest
      void testRead02()
      Test #2 for read() method
      Assertion: returns -1 if EOS had been reached but not read before method call
      Assertion: must not update digest if EOS had been reached but not read before method call
      void testRead03()
      Test #3 for read() method
      Test #1 for on(boolean) method
      Assertion: read() must not update digest if it is off
      Assertion: on(boolean) turns digest functionality on (if true passed as a parameter) or off (if false passed)
      void testRead04()
      Test #4 for read() method
      Assertion: broken DigestInputStreaminstance: InputStream not set.
      void testRead05()
      Test #5 for read() method
      Assertion: broken DigestInputStreaminstance: associated MessageDigest not set.
      void testRead06()
      Test #6 for read() method
      Test #2 for on(boolean) method
      Assertion: broken DigestInputStreaminstance: associated MessageDigest not set.
      void testReadbyteArrayintint01()
      Test #1 for read(byte[],int,int) method
      Assertion: returns the number of bytes read
      Assertion: put bytes read into specified array at specified offset
      Assertion: updates associated digest
      void testReadbyteArrayintint02()
      Test #2 for read(byte[],int,int) method
      Assertion: returns the number of bytes read
      Assertion: put bytes read into specified array at specified offset
      Assertion: updates associated digest
      void testReadbyteArrayintint03()
      Test #3 for read(byte[],int,int) method
      Assertion: returns the number of bytes read
      Assertion: put bytes read into specified array at specified offset
      Assertion: updates associated digest
      void testReadbyteArrayintint04()
      Test #4 for read(byte[],int,int) method
      Assertion: returns the number of bytes read
      Assertion: updates associated digest
      void testReadbyteArrayintint05()
      Test #5 for read(byte[],int,int) method
      Assertion: returns the number of bytes read
      Assertion: put bytes read into specified array at specified offset
      Assertion: does not update associated digest if digest functionality is off
      void testSetMessageDigest()
      Test for setMessageDigest() method
      Assertion: set associated message digest
      void testToString()
      Test for toString() method
      Assertion: returns String representation of this object
    • Constructor Detail

      • DigestInputStreamTest

        public DigestInputStreamTest()
    • Method Detail

      • testDigestInputStream01

        public final void testDigestInputStream01()
        Test #1 for DigestInputStream constructor
        Assertion: creates new DigestInputStream instance using valid parameters (both non null)
        Throws:
        NoSuchAlgorithmException
      • testDigestInputStream02

        public final void testDigestInputStream02()
        Test #2 for DigestInputStream constructor
        Assertion: creates new DigestInputStream instance using valid parameters (both null)
      • testRead01

        public final void testRead01()
                              throws IOException
        Test #1 for read() method
        Assertion: returns the byte read
        Assertion: updates associated digest
        Throws:
        IOException
      • testRead02

        public final void testRead02()
                              throws IOException
        Test #2 for read() method
        Assertion: returns -1 if EOS had been reached but not read before method call
        Assertion: must not update digest if EOS had been reached but not read before method call
        Throws:
        IOException
      • testRead03

        public final void testRead03()
                              throws IOException
        Test #3 for read() method
        Test #1 for on(boolean) method
        Assertion: read() must not update digest if it is off
        Assertion: on(boolean) turns digest functionality on (if true passed as a parameter) or off (if false passed)
        Throws:
        IOException
      • testRead04

        public final void testRead04()
                              throws IOException
        Test #4 for read() method
        Assertion: broken DigestInputStreaminstance: InputStream not set. read() must not work
        Throws:
        IOException
      • testRead05

        public final void testRead05()
        Test #5 for read() method
        Assertion: broken DigestInputStreaminstance: associated MessageDigest not set. read() must not work when digest functionality is on
      • testRead06

        public final void testRead06()
                              throws IOException
        Test #6 for read() method
        Test #2 for on(boolean) method
        Assertion: broken DigestInputStreaminstance: associated MessageDigest not set. read() must work when digest functionality is off
        Throws:
        IOException
      • testReadbyteArrayintint01

        public final void testReadbyteArrayintint01()
                                             throws IOException
        Test #1 for read(byte[],int,int) method
        Assertion: returns the number of bytes read
        Assertion: put bytes read into specified array at specified offset
        Assertion: updates associated digest
        Throws:
        IOException
      • testReadbyteArrayintint02

        public final void testReadbyteArrayintint02()
                                             throws IOException
        Test #2 for read(byte[],int,int) method
        Assertion: returns the number of bytes read
        Assertion: put bytes read into specified array at specified offset
        Assertion: updates associated digest
        Throws:
        IOException
      • testReadbyteArrayintint03

        public final void testReadbyteArrayintint03()
                                             throws IOException
        Test #3 for read(byte[],int,int) method
        Assertion: returns the number of bytes read
        Assertion: put bytes read into specified array at specified offset
        Assertion: updates associated digest
        Throws:
        IOException
      • testReadbyteArrayintint04

        public final void testReadbyteArrayintint04()
                                             throws IOException
        Test #4 for read(byte[],int,int) method
        Assertion: returns the number of bytes read
        Assertion: updates associated digest
        Throws:
        IOException
      • testReadbyteArrayintint05

        public final void testReadbyteArrayintint05()
                                             throws IOException
        Test #5 for read(byte[],int,int) method
        Assertion: returns the number of bytes read
        Assertion: put bytes read into specified array at specified offset
        Assertion: does not update associated digest if digest functionality is off
        Throws:
        IOException
      • testGetMessageDigest

        public final void testGetMessageDigest()
        Test for getMessageDigest() method
        Assertion: returns associated message digest
      • testSetMessageDigest

        public final void testSetMessageDigest()
        Test for setMessageDigest() method
        Assertion: set associated message digest
      • testOn

        public final void testOn()
                          throws IOException
        Test for on() method
        Assertion: turns digest functionality on or off
        Throws:
        IOException
      • testToString

        public final void testToString()
        Test for toString() method
        Assertion: returns String representation of this object


Content

Android Reference

Java basics

Java Enterprise Edition (EE)

Java Standard Edition (SE)

SQL

HTML

PHP

CSS

Java Script

MYSQL

JQUERY

VBS

REGEX

C

C++

C#

Design patterns

RFC (standard status)

RFC (proposed standard status)

RFC (draft standard status)

RFC (informational status)

RFC (experimental status)

RFC (best current practice status)

RFC (historic status)

RFC (unknown status)

IT dictionary

License.
All information of this service is derived from the free sources and is provided solely in the form of quotations. This service provides information and interfaces solely for the familiarization (not ownership) and under the "as is" condition.
Copyright 2016 © ELTASK.COM. All rights reserved.
Site is optimized for mobile devices.
Downloads: 947 / . Delta: 0.03429 с