Search in sources :

Example 1 with InheritanceTableCreator

use of org.eclipse.persistence.testing.models.jpa.inheritance.InheritanceTableCreator in project eclipselink by eclipse-ee4j.

the class JUnitJPQLInheritanceTestSuite method testSetup.

/**
 * The setup is done as a test, both to record its failure, and to allow execution in the server.
 */
public void testSetup() {
    clearCache();
    // get session to start setup
    DatabaseSession session = JUnitTestCase.getServerSession();
    // create a new EmployeePopulator
    EmployeePopulator employeePopulator = new EmployeePopulator();
    // initialize the global comparer object
    comparer = new JUnitDomainObjectComparer();
    // set the session for the comparer to use
    comparer.setSession((AbstractSession) session.getActiveSession());
    new AdvancedTableCreator().replaceTables(session);
    new InheritanceTableCreator().replaceTables(session);
    // Populate the tables
    employeePopulator.buildExamples();
    // Persist the examples in the database
    employeePopulator.persistExample(session);
    // Populate the tables
    InheritancePopulator inheritancePopulator = new InheritancePopulator();
    inheritancePopulator.buildExamples();
    // Persist the examples in the database
    inheritancePopulator.persistExample(session);
}
Also used : AdvancedTableCreator(org.eclipse.persistence.testing.models.jpa.advanced.AdvancedTableCreator) EmployeePopulator(org.eclipse.persistence.testing.models.jpa.advanced.EmployeePopulator) DatabaseSession(org.eclipse.persistence.sessions.DatabaseSession) InheritancePopulator(org.eclipse.persistence.testing.models.jpa.inheritance.InheritancePopulator) InheritanceTableCreator(org.eclipse.persistence.testing.models.jpa.inheritance.InheritanceTableCreator)

Example 2 with InheritanceTableCreator

use of org.eclipse.persistence.testing.models.jpa.inheritance.InheritanceTableCreator in project eclipselink by eclipse-ee4j.

the class EntityManagerJUnitTestCase method testSetup.

/**
 * The setup is done as a test, both to record its failure, and to allow execution in the server.
 */
public void testSetup() {
    new InheritanceTableCreator().replaceTables(JUnitTestCase.getServerSession());
    clearCache();
}
Also used : InheritanceTableCreator(org.eclipse.persistence.testing.models.jpa.inheritance.InheritanceTableCreator)

Example 3 with InheritanceTableCreator

use of org.eclipse.persistence.testing.models.jpa.inheritance.InheritanceTableCreator in project eclipselink by eclipse-ee4j.

the class MixedInheritanceJUnitTestCase method testSetup.

/**
 * The setup is done as a test, both to record its failure, and to allow execution in the server.
 */
public void testSetup() {
    new InheritanceTableCreator().replaceTables(JUnitTestCase.getServerSession());
    clearCache();
}
Also used : InheritanceTableCreator(org.eclipse.persistence.testing.models.jpa.inheritance.InheritanceTableCreator)

Example 4 with InheritanceTableCreator

use of org.eclipse.persistence.testing.models.jpa.inheritance.InheritanceTableCreator in project eclipselink by eclipse-ee4j.

the class LifecycleCallbackJunitTest method testSetup.

/**
 * The setup is done as a test, both to record its failure, and to allow execution in the server.
 */
public void testSetup() {
    new InheritanceTableCreator().replaceTables(JUnitTestCase.getServerSession());
    clearCache();
}
Also used : InheritanceTableCreator(org.eclipse.persistence.testing.models.jpa.inheritance.InheritanceTableCreator)

Example 5 with InheritanceTableCreator

use of org.eclipse.persistence.testing.models.jpa.inheritance.InheritanceTableCreator in project eclipselink by eclipse-ee4j.

the class TablePerClassInheritanceJUnitTest method testSetup.

/**
 * The setup is done as a test, both to record its failure, and to allow execution in the server.
 */
public void testSetup() {
    new InheritanceTableCreator().replaceTables(JUnitTestCase.getServerSession());
    clearCache();
}
Also used : InheritanceTableCreator(org.eclipse.persistence.testing.models.jpa.inheritance.InheritanceTableCreator)

Aggregations

InheritanceTableCreator (org.eclipse.persistence.testing.models.jpa.inheritance.InheritanceTableCreator)9 AdvancedTableCreator (org.eclipse.persistence.testing.models.jpa.advanced.AdvancedTableCreator)5 DatabaseSession (org.eclipse.persistence.sessions.DatabaseSession)3 EmployeePopulator (org.eclipse.persistence.testing.models.jpa.advanced.EmployeePopulator)3 InheritedTableManager (org.eclipse.persistence.testing.models.jpa.inherited.InheritedTableManager)3 InheritancePopulator (org.eclipse.persistence.testing.models.jpa.inheritance.InheritancePopulator)2 RelationshipsExamples (org.eclipse.persistence.testing.models.jpa.relationships.RelationshipsExamples)1 RelationshipsTableManager (org.eclipse.persistence.testing.models.jpa.relationships.RelationshipsTableManager)1 JUnitDomainObjectComparer (org.eclipse.persistence.testing.tests.jpa.jpql.JUnitDomainObjectComparer)1