Package org.marketcetera.util.test
Class SerializableAssert
- java.lang.Object
-
- org.marketcetera.util.test.SerializableAssert
-
public final class SerializableAssert extends Object
Assertions for serialization.- Since:
- 1.0.0
- Version:
- $Id$
- Author:
- tlerios@marketcetera.com
-
-
Constructor Summary
Constructors Modifier Constructor Description privateSerializableAssert()Constructor.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidassertSerializable(Serializable o)Asserts that the given object serializes correctly, i.e.static voidassertSerializable(String message, Serializable o)Asserts that the given object serializes correctly, i.e.
-
-
-
Method Detail
-
assertSerializable
public static void assertSerializable(String message, Serializable o)
Asserts that the given object serializes correctly, i.e. the deserialized version of the object is equal to the original object. If the assertion does not hold, theAssertionErrorthrown starts with the given message, which may be null if no such custom message prefix is desired.- Parameters:
message- The message.o- The object.
-
assertSerializable
public static void assertSerializable(Serializable o)
Asserts that the given object serializes correctly, i.e. the deserialized version of the object is equal to the original object.- Parameters:
o- The object.
-
-