Protected Member Functions |
NullValues | createValidInstance () |
int | whatDatabaseDefault (int id) |
int | whatDatabaseNull (int id) |
int | whatNullValue (int id) |
boolean | getCleanupAfterTest () |
void | setAutoCommit (Connection connection, boolean b) |
void | createEmployeeInstances (int count) |
void | consistencyCheck (Employee emp) |
void | createDn2idInstances (int number) |
void | consistencyCheck (Dn2id dn2id) |
List< Object[]> | getExpected () |
String | getTableName () |
int | getNumberOfInstances () |
ColumnDescriptor[] | getColumnDescriptors () |
Object | getColumnValue (int i, int j) |
void | writeJDBCreadNDB () |
void | writeJDBCreadJDBC () |
void | writeNDBreadNDB () |
void | writeNDBreadJDBC () |
void | queryAndVerifyResults (String where, ColumnDescriptor[] columnDescriptors, String conditions, Object[] parameters, int...objectIds) |
List< Object[]> | queryJDBC (ColumnDescriptor[] columnDescriptors, String conditions, Object[] parameters) |
void | verifyQueryResults (String where, List< Object[]> results, int...objectIds) |
void | verify (String where, List< Object[]> expecteds, List< Object[]> actuals) |
void | generateInstances (ColumnDescriptor[] columnDescriptors) |
IdBase | getNewInstance (Class<?extends IdBase > modelClass) |
void | writeToJDBC (ColumnDescriptor[] columnDescriptors, List< IdBase > instances) |
void | writeToNDB (ColumnDescriptor[] columnDescriptors, List< IdBase > instances) |
List< Object[]> | readFromNDB (ColumnDescriptor[] columnDescriptors) |
List< Object[]> | readFromJDBC (ColumnDescriptor[] columnDescriptors) |
String | getA1for (int number, int index) |
String | getA3for (long i) |
void | createAllPrimitivesInstances (int number) |
void | createAllPrimitivesInstances (Session session, int number) |
AllPrimitives | createAllPrimitiveInstance (Session session, int i) |
void | initialize (AllPrimitives instance, int i) |
boolean | getDebug () |
void | addTearDownClasses (Class<?>...classes) |
void | createSessionFactory () |
Properties | modifyProperties () |
void | dumpSystemProperties () |
void | error (String message) |
void | error (String context, Exception ex) |
void | errorIfNotEqual (String message, Object expected, Object actual) |
void | errorIfNotEqual (String message, int[] expected, int[] actual) |
void | errorIfEqual (String message, Object expected, Object actual) |
void | failOnError () |
void | closeConnection () |
void | getConnection (Properties extraProperties) |
Connection | getConnection () |
void | getConnection (String propertiesFileName) |
void | loadDriver () |
void | initializeErrorMessages () |
void | initializeJDBC () |
void | initializeSchema () |
void | loadProperties () |
void | loadProperties (String propsFileName) |
void | loadSchema () |
void | loadSchemaDefinition () |
void | localTearDown () |
final void | setUp () throws Exception |
final void | tearDown () throws Exception |
void | removeAll (Class<?> cls) |
boolean | testSchema () |
boolean | resetSchema () |
String | dump (List< String > list) |
Static Protected Attributes |
static final String | tablename = "nullvalues" |
static final int | numberOfPropertyTypes = 7 |
static final int | numberOfFieldsPerProperty = 12 |
static final int | DATABASE_NOT_NULL = 0 |
static final int | DATABASE_NULL = 1 |
static final String[] | databaseNull |
static final int | DATABASE_NO_DEFAULT = 0 |
static final int | DATABASE_DEFAULT = 2 |
static final String[] | databaseDefault |
static final int | NULLVALUE_NONE = 0 |
static final int | NULLVALUE_EXCEPTION = 4 |
static final int | NULLVALUE_DEFAULT = 8 |
static final String[] | nullValue |
static final String[] | propertyTypes |
static TimeZone | localSystemTimeZone = TimeZone.getDefault() |
static final long | ONE_SECOND = 1000L |
static final long | ONE_MINUTE = 1000L * 60L |
static final long | ONE_HOUR = 1000L * 60L * 60L |
static final long | TEN_HOURS = 1000L * 60L * 60L * 10L |
static final long | ONE_DAY = 1000L * 60L * 60L * 24L |
static Object[] | dn2idPK = setupDn2idPK() |
static final String | JDBC_DRIVER_NAME = "jdbc.driverName" |
static final String | JDBC_URL = "jdbc.url" |
static Connection | connection |
static String | jdbcDriverName |
static String | jdbcPassword |
static String | jdbcURL |
static String | jdbcUsername |
static Properties | props |
static List< String > | schemaDefinition = new ArrayList<String>() |
static boolean | schemaInitialized = false |
Definition at line 25 of file NullValuesTest.java.
void testsuite.clusterj.NullValuesTest.test |
( |
| ) |
|
|
inline |
Test that the behavior of the NullValue annotation is effective. For each column type, test the NullValue annotation behavior for null values: NullValue.NONE: nothing is done by ClusterJ, so the behavior of the database takes over, which might result in an exception or a default value being written NullValue.EXCEPTION: ClusterJ throws an exception NullValue.DEFAULT: ClusterJ sets the value to the default value as defined in ClusterJ metadata The test makes use of a class, NullValues, that contains properties of all nullable types and all NullValue annotations on those types. Each property is assigned a number for the test.
Definition at line 73 of file NullValuesTest.java.