Class AbstractPacketTest

java.lang.Object
org.bouncycastle.util.test.SimpleTest
org.bouncycastle.bcpg.test.AbstractPacketTest
All Implemented Interfaces:
org.bouncycastle.util.test.Test
Direct Known Subclasses:
EncryptedMessagePacketTest, OCBEncryptedDataPacketTest, OnePassSignaturePacketTest, OpenPgpMessageTest, SignaturePacketTest, SignatureSubpacketsTest, UnknownPublicKeyPacketTest, UnknownSecretKeyPacketTest

public abstract class AbstractPacketTest extends org.bouncycastle.util.test.SimpleTest
  • Nested Class Summary

    Nested classes/interfaces inherited from class org.bouncycastle.util.test.SimpleTest

    org.bouncycastle.util.test.SimpleTest.TestExceptionOperation
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    isEncodingEqual(byte[] first, byte[] second)
    Test, whether the first byte array and the second byte array are identical.
    void
    isEncodingEqual(String message, byte[] first, byte[] second)
    Test, whether the first byte array and the second byte array are identical.
    void
    Test, whether the encoding of the first and second packet are identical.
    void
    Test, whether the encoding of the first and second packet are identical.
    void
    isFalse(boolean value)
    Test, whether the value is false.
    void
    isFalse(String message, boolean value)
    Test, whether the value is false.
    void
    Test, whether the value is not null.
    void
    isNotNull(String message, Object value)
    Test, whether the value is not null.
    void
    isNull(Object value)
    Test, whether the value is null.
    void
    isNull(String message, Object value)
    Test, whether the value is null.

    Methods inherited from class org.bouncycastle.util.test.SimpleTest

    areEqual, areEqual, areEqual, fail, fail, fail, getName, isEquals, isEquals, isEquals, isEquals, isEquals, isEquals, isEquals, isTrue, isTrue, perform, performTest, runTest, runTest, runTests, runTests, testException

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • AbstractPacketTest

      public AbstractPacketTest()
  • Method Details

    • isEncodingEqual

      public void isEncodingEqual(byte[] first, byte[] second)
      Test, whether the first byte array and the second byte array are identical. If a mismatch is detected, a formatted hex dump of both arrays is printed to stdout.
      Parameters:
      first - first array
      second - second array
    • isEncodingEqual

      public void isEncodingEqual(String message, byte[] first, byte[] second)
      Test, whether the first byte array and the second byte array are identical. If a mismatch is detected, a formatted hex dump of both arrays is printed to stdout.
      Parameters:
      message - error message to prepend to the hex dump
      first - first array
      second - second array
    • isEncodingEqual

      public void isEncodingEqual(ContainedPacket first, ContainedPacket second) throws IOException
      Test, whether the encoding of the first and second packet are identical. If a mismatch is detected, a formatted hex dump of both packet encodings is printed to stdout.
      Parameters:
      first - first packet
      second - second packet
      Throws:
      IOException
    • isEncodingEqual

      public void isEncodingEqual(String message, ContainedPacket first, ContainedPacket second) throws IOException
      Test, whether the encoding of the first and second packet are identical. If a mismatch is detected, a formatted hex dump of both packet encodings is printed to stdout.
      Parameters:
      message - error message to prepend to the hex dump
      first - first packet
      second - second packet
      Throws:
      IOException
    • isFalse

      public void isFalse(boolean value)
      Test, whether the value is false.
      Parameters:
      value - value
    • isFalse

      public void isFalse(String message, boolean value)
      Test, whether the value is false.
      Parameters:
      message - custom error message
      value - value
    • isNull

      public void isNull(Object value)
      Test, whether the value is null.
      Parameters:
      value - value
    • isNull

      public void isNull(String message, Object value)
      Test, whether the value is null.
      Parameters:
      message - custom error message
      value - value
    • isNotNull

      public void isNotNull(Object value)
      Test, whether the value is not null.
      Parameters:
      value - value
    • isNotNull

      public void isNotNull(String message, Object value)
      Test, whether the value is not null.
      Parameters:
      message - custom error message
      value - value