p3j.database.hibernate
Class TestHibernateConnection

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by p3j.database.hibernate.TestHibernateConnection
All Implemented Interfaces:
junit.framework.Test

public class TestHibernateConnection
extends junit.framework.TestCase

Tests Hibernate connection. Created: August 17, 2008

Author:
Christina Bohk, Roland Ewald

Field Summary
static String EXPL_DELETION
          Explanation for asserting a proper deletion.
static String EXPL_EQUAL_FIRST
          Explanation for asserting object equality.
static String EXPL_ID_SAVE
          Explanation for assertion regarding automated ID generation.
static String EXPL_INSTANTIATION
          Explanation for assertion regarding instance generation.
static String EXPL_ONE_ENTITY
          Explanation for asserting the size of the table (1 row).
static String EXPL_TWO_ENTITIES
          Explanation for asserting the size of the table (2 rows).
static String EXPL_UNIQUE
          Explanation for asserting the retrieval of identical entities.
static int TEST_GENERATIONS
          Number of generations for which to test.
static int TEST_JUMP_OFF_YEAR
          The jump-off year for testing.
static int TEST_MAX_AGE
          Maximum age for testing.
static int TEST_PRED_YEARS
          Number of years to be predicted when testing.
static int TEST_SQUARE_MATRIX_WIDTH
          Width of the square used for testing.
 
Constructor Summary
TestHibernateConnection()
           
 
Method Summary
 void matrixOperations()
           
 void parameterAssignmentOperations()
           
 void parameterInstanceOperations()
           
 void projectionOperations()
           
 void setOperations()
           
 void setTypeOperations()
           
 void setUp()
           
 void tearDown()
           
 void testMatrixOperations()
          Tests all matrix-related operations.
 void testParameterAssignmentOperations()
           
 void testParameterInstanceOperations()
          Tests database operations for ParameterInstance objects.
 void testParameterOperations()
          Tests all database operations regarding Parameter objects.
 void testProjectionOperations()
           
 void testResultStorage()
           
 void testSetOperations()
           
 void testSetTypeOperations()
           
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, run, run, runBare, runTest, setName, toString
 
Methods inherited from class junit.framework.Assert
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

EXPL_INSTANTIATION

public static final String EXPL_INSTANTIATION
Explanation for assertion regarding instance generation.

See Also:
Constant Field Values

EXPL_ID_SAVE

public static final String EXPL_ID_SAVE
Explanation for assertion regarding automated ID generation.

See Also:
Constant Field Values

EXPL_UNIQUE

public static final String EXPL_UNIQUE
Explanation for asserting the retrieval of identical entities.

See Also:
Constant Field Values

EXPL_ONE_ENTITY

public static final String EXPL_ONE_ENTITY
Explanation for asserting the size of the table (1 row).

See Also:
Constant Field Values

EXPL_TWO_ENTITIES

public static final String EXPL_TWO_ENTITIES
Explanation for asserting the size of the table (2 rows).

See Also:
Constant Field Values

EXPL_DELETION

public static final String EXPL_DELETION
Explanation for asserting a proper deletion.

See Also:
Constant Field Values

EXPL_EQUAL_FIRST

public static final String EXPL_EQUAL_FIRST
Explanation for asserting object equality.

See Also:
Constant Field Values

TEST_SQUARE_MATRIX_WIDTH

public static final int TEST_SQUARE_MATRIX_WIDTH
Width of the square used for testing.

See Also:
Constant Field Values

TEST_GENERATIONS

public static final int TEST_GENERATIONS
Number of generations for which to test.

See Also:
Constant Field Values

TEST_MAX_AGE

public static final int TEST_MAX_AGE
Maximum age for testing.

See Also:
Constant Field Values

TEST_JUMP_OFF_YEAR

public static final int TEST_JUMP_OFF_YEAR
The jump-off year for testing.


TEST_PRED_YEARS

public static final int TEST_PRED_YEARS
Number of years to be predicted when testing.

See Also:
Constant Field Values
Constructor Detail

TestHibernateConnection

public TestHibernateConnection()
Method Detail

setUp

public void setUp()
           throws Exception
Overrides:
setUp in class junit.framework.TestCase
Throws:
Exception

tearDown

public void tearDown()
              throws Exception
Overrides:
tearDown in class junit.framework.TestCase
Throws:
Exception

testParameterOperations

public void testParameterOperations()
                             throws Exception
Tests all database operations regarding Parameter objects.

Throws:
Exception - when something fails

testParameterInstanceOperations

public void testParameterInstanceOperations()
                                     throws Exception
Tests database operations for ParameterInstance objects.

Throws:
Exception - when something fails

parameterInstanceOperations

public void parameterInstanceOperations()
                                 throws Exception
Throws:
Exception

testMatrixOperations

public void testMatrixOperations()
                          throws Exception
Tests all matrix-related operations.

Throws:
Exception - if database operations fail

matrixOperations

public void matrixOperations()
                      throws Exception
Throws:
Exception

testParameterAssignmentOperations

public void testParameterAssignmentOperations()
                                       throws Exception
Throws:
Exception

parameterAssignmentOperations

public void parameterAssignmentOperations()
                                   throws Exception
Throws:
Exception

testSetOperations

public void testSetOperations()
                       throws Exception
Throws:
Exception

setOperations

public void setOperations()
                   throws Exception
Throws:
Exception

testSetTypeOperations

public void testSetTypeOperations()
                           throws Exception
Throws:
Exception

setTypeOperations

public void setTypeOperations()
                       throws Exception
Throws:
Exception

testProjectionOperations

public void testProjectionOperations()
                              throws Exception
Throws:
Exception

projectionOperations

public void projectionOperations()
                          throws Exception
Throws:
Exception

testResultStorage

public void testResultStorage()


Copyright © 2012. All Rights Reserved.