Package data
Class TestMultiTypeWrapper
java.lang.Object
data.TestMultiTypeWrapper
public class TestMultiTypeWrapper
extends java.lang.Object
Tests the multi-type wrapper logic
-
Field Summary
Fields Modifier and Type Field Description static org.apache.logging.log4j.Logger
logger
The logger for TestMultiTypeWrapperboolean
printInfo
Whether to print more detailed information about the test.static java.util.Map<java.lang.String,java.lang.Object>
TEST_BOTH_DIRECTIONS
Tests to perform that go in both directions -- from object into the DB, and from the DB into objectstatic java.util.Map<java.lang.String,java.lang.Object>
TEST_FROM_DB
Tests that go in one direction, from the DB into an objectstatic java.util.Map<java.lang.Object,java.lang.String>
TEST_TO_DB
Tests that go in one direction, from an object into the DBjava.util.Map<java.lang.String,java.lang.Object>
testBothDirections
Tests that will go in both direction, object to DB, and DB to objectjava.util.Map<java.lang.String,java.lang.Object>
testFromDb
Tests that will go from DB to object onlyjava.util.Map<java.lang.Object,java.lang.String>
testToDb
Tests that will go from object to DB only -
Constructor Summary
Constructors Constructor Description TestMultiTypeWrapper()
Instantiates a new Test multi type wrapper using the default tests -
Method Summary
Modifier and Type Method Description static java.lang.Object
createUnknownType()
Create a multiTypeWrapper of an unknown typevoid
logCounter()
Logs the number of instances of MultiTypeWrapper which have been constructedvoid
testBothDirections()
Run all the tests that go in both direectionsvoid
testFromDb()
Run all tests which go from DB to objectvoid
testToDb()
Run all the tests that go from object to DB
-
Field Details
-
logger
public static final org.apache.logging.log4j.Logger loggerThe logger for TestMultiTypeWrapper -
TEST_BOTH_DIRECTIONS
public static java.util.Map<java.lang.String,java.lang.Object> TEST_BOTH_DIRECTIONSTests to perform that go in both directions -- from object into the DB, and from the DB into object -
TEST_FROM_DB
public static java.util.Map<java.lang.String,java.lang.Object> TEST_FROM_DBTests that go in one direction, from the DB into an object -
TEST_TO_DB
public static java.util.Map<java.lang.Object,java.lang.String> TEST_TO_DBTests that go in one direction, from an object into the DB -
testBothDirections
public java.util.Map<java.lang.String,java.lang.Object> testBothDirectionsTests that will go in both direction, object to DB, and DB to object -
testFromDb
public java.util.Map<java.lang.String,java.lang.Object> testFromDbTests that will go from DB to object only -
testToDb
public java.util.Map<java.lang.Object,java.lang.String> testToDbTests that will go from object to DB only -
printInfo
public boolean printInfoWhether to print more detailed information about the test. This is switched off when running SyncMultiTypeWrapper
-
-
Constructor Details
-
TestMultiTypeWrapper
public TestMultiTypeWrapper()Instantiates a new Test multi type wrapper using the default tests
-
-
Method Details
-
createUnknownType
public static java.lang.Object createUnknownType()Create a multiTypeWrapper of an unknown type- Returns:
- the object
-
logCounter
public void logCounter()Logs the number of instances of MultiTypeWrapper which have been constructed -
testBothDirections
public void testBothDirections()Run all the tests that go in both direections -
testToDb
public void testToDb()Run all the tests that go from object to DB -
testFromDb
public void testFromDb()Run all tests which go from DB to object
-