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 TestMultiTypeWrapper
    boolean 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 object
    static java.util.Map<java.lang.String,​java.lang.Object> TEST_FROM_DB
    Tests that go in one direction, from the DB into an object
    static java.util.Map<java.lang.Object,​java.lang.String> TEST_TO_DB
    Tests that go in one direction, from an object into the DB
    java.util.Map<java.lang.String,​java.lang.Object> testBothDirections
    Tests that will go in both direction, object to DB, and DB to object
    java.util.Map<java.lang.String,​java.lang.Object> testFromDb
    Tests that will go from DB to object only
    java.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 type
    void logCounter()
    Logs the number of instances of MultiTypeWrapper which have been constructed
    void testBothDirections()
    Run all the tests that go in both direections
    void testFromDb()
    Run all tests which go from DB to object
    void testToDb()
    Run all the tests that go from object to DB

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • logger

      public static final org.apache.logging.log4j.Logger logger
      The logger for TestMultiTypeWrapper
    • TEST_BOTH_DIRECTIONS

      public 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 object
    • TEST_FROM_DB

      public static java.util.Map<java.lang.String,​java.lang.Object> TEST_FROM_DB
      Tests 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_DB
      Tests that go in one direction, from an object into the DB
    • testBothDirections

      public java.util.Map<java.lang.String,​java.lang.Object> testBothDirections
      Tests that will go in both direction, object to DB, and DB to object
    • testFromDb

      public java.util.Map<java.lang.String,​java.lang.Object> testFromDb
      Tests that will go from DB to object only
    • testToDb

      public java.util.Map<java.lang.Object,​java.lang.String> testToDb
      Tests that will go from object to DB only
    • printInfo

      public boolean printInfo
      Whether 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