org.apache.commons.id.test
Class AssertSerialization.SerializationTest

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by org.apache.commons.id.test.AssertSerialization.SerializationTest
All Implemented Interfaces:
junit.framework.Test
Enclosing class:
AssertSerialization

protected static class AssertSerialization.SerializationTest
extends junit.framework.TestCase

A test case used to test the serialization capability and the compatibility with previous versions of the type. Instances of the class are internally generated.

Since:
1.0
Author:
Jörg Schaible

Method Summary
 void checkCompatibility(java.lang.String filename)
          Test the compatibility with a version of the type.
protected  void runTest()
           
 void testBinaryRepresentationIsStillValid()
          Ensure that serialized reference is still the same.
 void testSerialization()
          Test the serializability of the object.
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, run, run, runBare, setName, setUp, tearDown, toString
 
Methods inherited from class junit.framework.Assert
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

testSerialization

public void testSerialization()
Test the serializability of the object.


testBinaryRepresentationIsStillValid

public void testBinaryRepresentationIsStillValid()
                                          throws java.io.IOException
Ensure that serialized reference is still the same.

Throws:
java.io.IOException
Since:
1.0

checkCompatibility

public void checkCompatibility(java.lang.String filename)
Test the compatibility with a version of the type.

Parameters:
filename - the filename of the file with the serialized object

runTest

protected void runTest()
                throws java.lang.Throwable
Overrides:
runTest in class junit.framework.TestCase
Throws:
java.lang.Throwable


Copyright © 2003-2008 The Apache Software Foundation. All Rights Reserved.