use of org.eclipse.persistence.testing.framework.UnitOfWorkBasicUpdateObjectTest in project eclipselink by eclipse-ee4j.
the class MappingTestModel method getUpdateObjectTestSuite.
public static TestSuite getUpdateObjectTestSuite() {
TestSuite suite = new TestSuite();
suite.setName("MappingUpdateObjectTestSuite");
suite.setDescription("This suite tests the updating of each object in the mapping model.");
PopulationManager manager = PopulationManager.getDefaultManager();
suite.addTest(new WriteObjectTest(manager.getObject(Employee.class, "example1")));
suite.addTest(new UnitOfWorkBasicUpdateObjectTest(manager.getObject(Employee.class, "example1")));
suite.addTest(new UnitOfWorkBasicUpdateObjectTest(manager.getObject(Employee.class, "example2")));
suite.addTest(new UnitOfWorkBasicUpdateObjectTest(manager.getObject(Employee.class, "example3")));
suite.addTest(new WriteObjectTest(manager.getObject(Shipment.class, "example1")));
suite.addTest(new UnitOfWorkBasicUpdateObjectTest(manager.getObject(Shipment.class, "example1")));
suite.addTest(new AddObjectNonPrimaryKeyManyToManyTest());
return suite;
}
use of org.eclipse.persistence.testing.framework.UnitOfWorkBasicUpdateObjectTest in project eclipselink by eclipse-ee4j.
the class MappingTestModel method getAdditionalJoinTest.
public static TestSuite getAdditionalJoinTest() {
TestSuite suite = new TestSuite();
suite.setName("AdditionalJoinTestSuite");
suite.setDescription("This suite tests the addition of an additionalJoinExpression.");
suite.addTest(new AdditionalJoinExpressionTest());
PopulationManager manager = PopulationManager.getDefaultManager();
suite.addTest(new MultipleTableReadObjectTest(manager.getObject(Employee1.class, "example1"), "amendEmployee1WithJoinWithInsert"));
suite.addTest(new MultipleTableReadObjectTest(manager.getObject(Employee1.class, "example1"), "amendEmployee1WithFKInfo"));
suite.addTest(new MultipleTableReadObjectTest(manager.getObject(Employee1.class, "example1"), "amendEmployee1WithJoinOnly"));
suite.addTest(new MultipleTableInsertObjectTest(manager.getObject(Employee1.class, "example2"), "amendEmployee1WithJoinWithInsert"));
suite.addTest(new MultipleTableInsertObjectTest(manager.getObject(Employee1.class, "example2"), "amendEmployee1WithFKInfo"));
suite.addTest(new MultipleTableReadAllTest(Employee1.class, 2, "amendEmployee1WithJoinWithInsert"));
suite.addTest(new MultipleTableReadAllTest(Employee1.class, 2, "amendEmployee1WithJoinOnly"));
suite.addTest(new MultipleTableReadAllTest(Employee1.class, 2, "amendEmployee1WithFKInfo"));
// The delete with join info would not work because of the lack of PK info.
suite.addTest(new MultipleTableDeleteObjectTest(manager.getObject(Employee1.class, "example3"), "amendEmployee1WithFKInfo"));
// The update with join info would not work because of the lack of PK info.
suite.addTest(new MultipleTableWriteObjectTest(manager.getObject(Employee1.class, "example3"), "amendEmployee1WithFKInfo"));
// Add tests for multiple table with fk from secondary table to primary table.
suite.addTest(new ReadObjectTest(manager.getObject(Employee2.class, "example1")));
suite.addTest(new WriteObjectTest(manager.getObject(Employee2.class, "example1")));
suite.addTest(new UnitOfWorkBasicUpdateObjectTest(manager.getObject(Employee2.class, "example1")));
suite.addTest(new DeleteObjectTest(manager.getObject(Employee2.class, "example1")));
suite.addTest(new InsertObjectTest(manager.getObject(Employee2.class, "example2")));
return suite;
}
use of org.eclipse.persistence.testing.framework.UnitOfWorkBasicUpdateObjectTest in project eclipselink by eclipse-ee4j.
the class AggregateTestModel method getSRGUpdateObjectTestSuite.
// SRG test set is maintained by QA only, do NOT add any new tests into it.
public static TestSuite getSRGUpdateObjectTestSuite() {
TestSuite suite = new TestSuite();
suite.setName("AggregateUpdateObjectTestSuite");
suite.setDescription("This suite tests the updating of each object in the aggregate model.");
Class<Employee1> employee1Class = Employee1.class;
Class<Employee> employeeClass = Employee.class;
Class<Client> clientClass = Client.class;
Class<EvaluationClient> evaluationClientClass = EvaluationClient.class;
PopulationManager manager = PopulationManager.getDefaultManager();
// =================================================================================
suite.addTest(new WriteObjectTest(manager.getObject(employee1Class, "example1")));
suite.addTest(new UnitOfWorkBasicUpdateObjectTest(manager.getObject(employee1Class, "example1")));
suite.addTest(new UnitOfWorkBasicUpdateObjectTest(manager.getObject(employee1Class, "example2")));
// =================================================================================
suite.addTest(new WriteObjectTest(manager.getObject(employeeClass, "example1")));
suite.addTest(new UnitOfWorkBasicUpdateObjectTest(manager.getObject(employeeClass, "example1")));
suite.addTest(new UnitOfWorkBasicUpdateObjectTest(manager.getObject(employeeClass, "example2")));
suite.addTest(new UnitOfWorkBasicUpdateObjectTest(manager.getObject(employeeClass, "example3")));
suite.addTest(new WriteObjectTest(manager.getObject(clientClass, "example1")));
suite.addTest(new UnitOfWorkBasicUpdateObjectTest(manager.getObject(clientClass, "example1")));
suite.addTest(new UnitOfWorkBasicUpdateObjectTest(manager.getObject(clientClass, "example2")));
suite.addTest(new UnitOfWorkBasicUpdateObjectTest(manager.getObject(clientClass, "example3")));
suite.addTest(new WriteObjectTest(manager.getObject(evaluationClientClass, "example1")));
suite.addTest(new UnitOfWorkBasicUpdateObjectTest(manager.getObject(evaluationClientClass, "example1")));
suite.addTest(new UnitOfWorkBasicUpdateObjectTest(manager.getObject(evaluationClientClass, "example2")));
suite.addTest(new UnitOfWorkBasicUpdateObjectTest(manager.getObject(evaluationClientClass, "example3")));
// update testing on aggregate collection mapping
suite.addTest(new WriteObjectTest(manager.getObject(Agent.class, "example1")));
suite.addTest(new UnitOfWorkBasicUpdateObjectTest(manager.getObject(Agent.class, "example1")));
if (useNewAggregateCollection) {
suite.addTest(new WriteObjectTest(manager.getObject(Builder.class, "example1")));
suite.addTest(new UnitOfWorkBasicUpdateObjectTest(manager.getObject(Builder.class, "example1")));
}
return suite;
}
Aggregations