|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.sf.jsefa.test.common.JSefaTestUtil
public final class JSefaTestUtil
Utility class for the JSefa tests.
| Nested Class Summary | |
|---|---|
static class |
JSefaTestUtil.FormatType
Enum constants for the different format types. |
| Method Summary | ||
|---|---|---|
static void |
assertRepeatedRoundTripSucceeds(JSefaTestUtil.FormatType formatType,
Configuration config,
Object... dtos)
Does a repeated round trip check, i. e. serializes the given dtos, deserializes them back again and tests if the result equals the input. |
|
static void |
assertRepeatedRoundTripSucceeds(JSefaTestUtil.FormatType formatType,
Object... dtos)
Does a repeated round trip check, i. e. serializes the given dtos, deserializes them back again and tests if the result equals the input. |
|
static Configuration |
createConfiguration(JSefaTestUtil.FormatType formatType)
Creates a default configuration for the given format type. |
|
static IOFactory |
createIOFactory(JSefaTestUtil.FormatType formatType,
Class<?>... objectTypes)
Creates a IOFactory. |
|
static IOFactory |
createIOFactory(JSefaTestUtil.FormatType formatType,
Configuration config,
Class<?>... objectTypes)
Creates a IOFactory. |
|
static
|
deserialize(JSefaTestUtil.FormatType formatType,
Configuration config,
String inputString,
Class<T>... objectTypes)
Deserializes an object of the given DTO from the given String. |
|
static
|
deserialize(JSefaTestUtil.FormatType formatType,
String inputString,
Class<T>... objectTypes)
Deserializes an object of the given DTO from the given String. |
|
static String |
serialize(JSefaTestUtil.FormatType formatType,
Class objectType,
Object object)
Serializes the given object using an IOFactory constructed for the given object type. |
|
static String |
serialize(JSefaTestUtil.FormatType formatType,
Configuration config,
Object... objects)
Serializes the given object. |
|
static String |
serialize(JSefaTestUtil.FormatType formatType,
Object... objects)
Serializes the given objects. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static void assertRepeatedRoundTripSucceeds(JSefaTestUtil.FormatType formatType,
Object... dtos)
formatType - the format typedtos - the DTOs
public static void assertRepeatedRoundTripSucceeds(JSefaTestUtil.FormatType formatType,
Configuration config,
Object... dtos)
formatType - the format typeconfig - the configurationdtos - the DTOs
public static String serialize(JSefaTestUtil.FormatType formatType,
Object... objects)
formatType - the format typeobjects - the objects to serialize
public static String serialize(JSefaTestUtil.FormatType formatType,
Configuration config,
Object... objects)
formatType - the format typeconfig - the configurationobjects - the objects to serialize
public static String serialize(JSefaTestUtil.FormatType formatType,
Class objectType,
Object object)
IOFactory constructed for the given object type.
formatType - the format typeobjectType - the object typeobject - the object to serialize
public static <T> T deserialize(JSefaTestUtil.FormatType formatType,
String inputString,
Class<T>... objectTypes)
String.
T - the type of the objectformatType - the format typeinputString - the String to deserialize the DTO fromobjectTypes - the object types
public static <T> T deserialize(JSefaTestUtil.FormatType formatType,
Configuration config,
String inputString,
Class<T>... objectTypes)
String.
T - the type of the objectformatType - the format typeconfig - the configurationinputString - the String to deserialize the DTO fromobjectTypes - the object types
public static Configuration createConfiguration(JSefaTestUtil.FormatType formatType)
formatType - the format type
public static IOFactory createIOFactory(JSefaTestUtil.FormatType formatType,
Class<?>... objectTypes)
IOFactory.
formatType - the format typeobjectTypes - the object types
IOFactory
public static IOFactory createIOFactory(JSefaTestUtil.FormatType formatType,
Configuration config,
Class<?>... objectTypes)
IOFactory.
formatType - the format typeconfig - the configurationobjectTypes - the object types
IOFactory
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||