Class TestCounters
java.lang.Object
test.de.iip_ecosphere.platform.transport.spring.TestCounters
A test helper class to count statistics for a serializer. The
StringSerializer used in testing
will record its activities here. Please consider resetting the counters before/after a test.- Author:
- Holger Eichelberger, SSE
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static intprivate static intprivate static int -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) static intReturns the copy-counter value.(package private) static intReturns the from-counter value.(package private) static intReturns the to-counter value.(package private) static voidIncreases the clone-counter (related to theclone-methodof the serializers.(package private) static voidIncreases the from-counter (related to thefrom-methodof the serializers.(package private) static voidIncreases the to-counter (related to theto-methodof the serializers.(package private) static voidreset()Resets all counters.
-
Field Details
-
toCount
private static int toCount -
fromCount
private static int fromCount -
cloneCount
private static int cloneCount
-
-
Constructor Details
-
TestCounters
TestCounters()
-
-
Method Details
-
reset
static void reset()Resets all counters. -
increaseTo
static void increaseTo()Increases the to-counter (related to theto-methodof the serializers. -
increaseFrom
static void increaseFrom()Increases the from-counter (related to thefrom-methodof the serializers. -
increaseClone
static void increaseClone()Increases the clone-counter (related to theclone-methodof the serializers. -
getToCount
static int getToCount()Returns the to-counter value.- Returns:
- the number of calls to
OutputTypeTranslator.to(Object)
-
getFromCount
static int getFromCount()Returns the from-counter value.- Returns:
- the number of calls to
InputTypeTranslator.from(Object)
-
getCloneCount
static int getCloneCount()Returns the copy-counter value.- Returns:
- the number of calls to
Serializer.clone(Object)
-