@TestTargetNew(
      level = TestLevel.COMPLETE,
      notes = "",
      method = "!SerializationGolden",
      args = {})
  public void testSerialization_Compatibility() throws Exception {
    UnresolvedPermission up =
        new UnresolvedPermission("java.security.SecurityPermission", "a.b.c", "actions", null);
    assertEquals("java.security.SecurityPermission", up.getUnresolvedType());
    assertEquals("a.b.c", up.getUnresolvedName());
    assertEquals("actions", up.getUnresolvedActions());
    assertNull(up.getUnresolvedCerts());

    SerializationTest.verifyGolden(
        this,
        up,
        new SerializableAssert() {
          public void assertDeserialized(Serializable orig, Serializable ser) {
            UnresolvedPermission deserializedUp = (UnresolvedPermission) ser;
            assertEquals("java.security.SecurityPermission", deserializedUp.getUnresolvedType());
            assertEquals("a.b.c", deserializedUp.getUnresolvedName());
            assertEquals("actions", deserializedUp.getUnresolvedActions());
            assertNull(deserializedUp.getUnresolvedCerts());
          }
        });
  }
예제 #2
0
 /** java.util.HashSet#SerializationTest */
 public void test_Serialization() throws Exception {
   HashSet<String> hs = new HashSet<String>();
   hs.add("hello");
   hs.add("world");
   SerializationTest.verifySelf(hs, comparator);
   SerializationTest.verifyGolden(this, hs, comparator);
 }
  /** @tests serialization/deserialization compatibility with RI. */
  @TestTargetNew(
      level = TestLevel.COMPLETE,
      notes = "Verifies serialization/deserialization compatibility.",
      method = "!SerializationGolden",
      args = {})
  public void testSerializationCompatibility() throws Exception {

    SerializationTest.verifyGolden(this, new InvalidMarkException());
  }
예제 #4
0
  /** @tests serialization/deserialization compatibility with RI. */
  public void testSerializationCompatibility() throws Exception {

    SQLException nextSQLException = new SQLException("nextReason", "nextSQLState", 33);

    int vendorCode = 10;
    SQLException object = new SQLException("reason", "SQLState", vendorCode);

    object.setNextException(nextSQLException);

    SerializationTest.verifyGolden(this, object, SQLEXCEPTION_COMPARATOR);
  }
  /** @tests serialization/deserialization compatibility with RI. */
  @TestTargets({
    @TestTargetNew(
        level = TestLevel.COMPLETE,
        notes = "Verifies serialization/deserialization compatibility.",
        method = "!SerializationGolden",
        args = {}),
    @TestTargetNew(
        level = TestLevel.PARTIAL_COMPLETE,
        notes = "Verifies serialization/deserialization compatibility.",
        method = "FileLockInterruptionException",
        args = {})
  })
  public void testSerializationCompatibility() throws Exception {

    SerializationTest.verifyGolden(this, new FileLockInterruptionException());
  }
 /** @test serialization/deserialization compatibility with RI. */
 public void test_compatibilitySerialization() throws Exception {
   SerializationTest.verifyGolden(this, sQLNonTransientException);
 }
 /**
  * @tests serialization/deserialization compatibility with RI.
  * @since 1.6
  */
 public void testSerializationCompatibility() throws Exception {
   String errorMsg = "java.io.IOError";
   IOError e = new IOError(new Throwable(errorMsg));
   SerializationTest.verifyGolden(this, e);
 }
예제 #8
0
  /** @tests serialization/deserialization compatibility with RI. */
  public void testSerializationCompatibility() throws Exception {

    SerializationTest.verifyGolden(this, new MockLevel("123", 123, "bundle"), LEVEL_COMPARATOR);
  }