use of org.eclipse.persistence.testing.models.jpa.inherited.InheritedTableManager in project eclipselink by eclipse-ee4j.
the class CMP3InheritedTestModel method setup.
@Override
public void setup() {
super.setup();
new InheritedTableManager().replaceTables(getServerSession());
}
use of org.eclipse.persistence.testing.models.jpa.inherited.InheritedTableManager in project eclipselink by eclipse-ee4j.
the class InheritedCallbacksJunitTest 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 InheritedTableManager().replaceTables(JUnitTestCase.getServerSession());
clearCache();
}
use of org.eclipse.persistence.testing.models.jpa.inherited.InheritedTableManager in project eclipselink by eclipse-ee4j.
the class OrderedListAttributeChangeTrackingJunitTest method suite.
public static Test suite() {
TestSuite suite = new TestSuite();
suite.setName("OrderedListAttributeChangeTrackingJunitTest");
suite.addTest(new OrderedListAttributeChangeTrackingJunitTest("testInitialize"));
suite.addTest(new OrderedListAttributeChangeTrackingJunitTest("test1"));
suite.addTest(new OrderedListAttributeChangeTrackingJunitTest("testInitialize"));
suite.addTest(new OrderedListAttributeChangeTrackingJunitTest("test2"));
suite.addTest(new OrderedListAttributeChangeTrackingJunitTest("testInitialize"));
suite.addTest(new OrderedListAttributeChangeTrackingJunitTest("test3"));
return new TestSetup(suite) {
private ObjectChangePolicy origPolicy;
@Override
protected void setUp() {
DatabaseSession session = JUnitTestCase.getServerSession();
new InheritedTableManager().replaceTables(session);
session.logout();
origPolicy = session.getDescriptor(BeerConsumer.class).getObjectChangePolicy();
session.getDescriptor(BeerConsumer.class).setObjectChangePolicy(new AttributeChangeTrackingPolicy());
session.login();
}
@Override
protected void tearDown() {
new OrderedListAttributeChangeTrackingJunitTest().clearCache();
ServerSession session = JUnitTestCase.getServerSession();
session.logout();
session.getDescriptor(BeerConsumer.class).setObjectChangePolicy(origPolicy);
session.login();
}
};
}
use of org.eclipse.persistence.testing.models.jpa.inherited.InheritedTableManager in project eclipselink by eclipse-ee4j.
the class JUnitJPQLComplexTestSuite 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();
// create a new PartnerLinkPopulator
PartnerLinkPopulator partnerLinkPopulator = new PartnerLinkPopulator();
new AdvancedTableCreator().replaceTables(session);
// initialize the global comparer object
comparer = new JUnitDomainObjectComparer();
// set the session for the comparer to use
comparer.setSession((AbstractSession) session.getActiveSession());
// Populate the tables
employeePopulator.buildExamples();
// Persist the examples in the database
employeePopulator.persistExample(session);
// Populate the tables
partnerLinkPopulator.buildExamples();
// Persist the examples in the database
partnerLinkPopulator.persistExample(session);
new InheritedTableManager().replaceTables(session);
new DataTypesTableCreator().replaceTables(session);
// create stored function when database supports it
if (supportsStoredFunctions()) {
SchemaManager schema = new SchemaManager(session);
schema.replaceObject(buildStoredFunction());
}
new CompositePKTableCreator().replaceTables(JUnitTestCase.getServerSession());
}
use of org.eclipse.persistence.testing.models.jpa.inherited.InheritedTableManager in project eclipselink by eclipse-ee4j.
the class InheritedModelJunitTest 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 InheritedTableManager().replaceTables(JUnitTestCase.getServerSession());
clearCache();
}
Aggregations