use of org.eclipse.persistence.tools.schemaframework.PopulationManager in project eclipselink by eclipse-ee4j.
the class MappingTestModel method getTransformationMappingTestSuite.
public static TestSuite getTransformationMappingTestSuite() {
TestSuite suite = new TestSuite();
suite.setName("MappingTransformationTestSuite");
suite.setDescription("This suite tests the reading of objects where the transformation mapping uses two parameters in the accessor method");
PopulationManager manager = PopulationManager.getDefaultManager();
suite.addTest(new TwoParametersTransformationMappingTest(manager.getObject(Address.class, "example1")));
suite.addTest(new TwoParametersTransformationMappingTest(manager.getObject(Address.class, "example2")));
return suite;
}
use of org.eclipse.persistence.tools.schemaframework.PopulationManager in project eclipselink by eclipse-ee4j.
the class NLSEmployeeBasicTestModel method getReadObjectTestSuite.
public static TestSuite getReadObjectTestSuite() {
TestSuite suite = new TestSuite();
suite.setName("EmployeeReadObjectTestSuite");
suite.setDescription("[NLS_Japanese] This suite test the reading of each object in the employee demo.");
Class<NLSEmployee> employeeClass = NLSEmployee.class;
Class<LargeProject> largeProjectClass = LargeProject.class;
Class<SmallProject> smallProjectClass = SmallProject.class;
PopulationManager manager = PopulationManager.getDefaultManager();
suite.addTest(new ReadObjectTest(manager.getObject(employeeClass, "0001")));
suite.addTest(new ReadObjectTest(manager.getObject(employeeClass, "0002")));
suite.addTest(new ReadObjectTest(manager.getObject(employeeClass, "0003")));
suite.addTest(new ReadObjectTest(manager.getObject(employeeClass, "0004")));
suite.addTest(new ReadObjectTest(manager.getObject(employeeClass, "0005")));
NLSEmployee employee = (NLSEmployee) manager.getObject(employeeClass, "0001");
suite.addTest(new ReadObjectCallTest(employeeClass, new SQLCall("SELECT t0.\u306b\u304a\u3064\u3066\u3051\u305d\u305b, t1.\u304a\u3059\u305f_\u3051\u3048, t0.\u3057_\u305b\u3042\u3059\u304a, t0.\u304b_\u305b\u3042\u3059\u304a, t1.\u3066\u3042\u3057\u3042\u3064\u306e, t0.\u304a\u3059\u305f_\u3051\u3048, t0.\u304d\u304a\u305b\u3048\u304a\u3064, t0.\u304a\u305b\u3048_\u3048\u3042\u3068\u304a, t0.\u3066\u3068\u3042\u3064\u3068_\u3048\u3042\u3068\u304a, t0.\u3059\u3042\u305b\u3042\u304d\u304a\u3064_\u3051\u3048, t0.\u304a\u305b\u3048_\u3068\u3051\u3059\u304a, t0.\u3066\u3068\u3042\u3064\u3068_\u3068\u3051\u3059\u304a, t0.\u3042\u3048\u3048\u3064_\u3051\u3048 FROM \u304a\u3059\u305f t0, \u3066\u3042\u3057\u3042\u3064\u306e t1 WHERE t1.\u304a\u3059\u305f_\u3051\u3048 = t0.\u304a\u3059\u305f_\u3051\u3048 AND t0.\u304b_\u305b\u3042\u3059\u304a = '" + employee.getFirstName() + "' AND t0.\u3057_\u305b\u3042\u3059\u304a = '" + employee.getLastName() + "'")));
employee = (NLSEmployee) manager.getObject(employeeClass, "0002");
suite.addTest(new ReadObjectCallTest(employeeClass, new SQLCall("SELECT t0.\u306b\u304a\u3064\u3066\u3051\u305d\u305b, t1.\u304a\u3059\u305f_\u3051\u3048, t0.\u3057_\u305b\u3042\u3059\u304a, t0.\u304b_\u305b\u3042\u3059\u304a, t1.\u3066\u3042\u3057\u3042\u3064\u306e, t0.\u304a\u3059\u305f_\u3051\u3048, t0.\u304d\u304a\u305b\u3048\u304a\u3064, t0.\u304a\u305b\u3048_\u3048\u3042\u3068\u304a, t0.\u3066\u3068\u3042\u3064\u3068_\u3048\u3042\u3068\u304a, t0.\u3059\u3042\u305b\u3042\u304d\u304a\u3064_\u3051\u3048, t0.\u304a\u305b\u3048_\u3068\u3051\u3059\u304a, t0.\u3066\u3068\u3042\u3064\u3068_\u3068\u3051\u3059\u304a, t0.\u3042\u3048\u3048\u3064_\u3051\u3048 FROM \u304a\u3059\u305f t0, \u3066\u3042\u3057\u3042\u3064\u306e t1 WHERE t1.\u304a\u3059\u305f_\u3051\u3048 = t0.\u304a\u3059\u305f_\u3051\u3048 AND t0.\u304b_\u305b\u3042\u3059\u304a = '" + employee.getFirstName() + "' AND t0.\u3057_\u305b\u3042\u3059\u304a = '" + employee.getLastName() + "'")));
employee = (NLSEmployee) manager.getObject(employeeClass, "0003");
suite.addTest(new ReadObjectCallTest(employeeClass, new SQLCall("SELECT t0.\u306b\u304a\u3064\u3066\u3051\u305d\u305b, t1.\u304a\u3059\u305f_\u3051\u3048, t0.\u3057_\u305b\u3042\u3059\u304a, t0.\u304b_\u305b\u3042\u3059\u304a, t1.\u3066\u3042\u3057\u3042\u3064\u306e, t0.\u304a\u3059\u305f_\u3051\u3048, t0.\u304d\u304a\u305b\u3048\u304a\u3064, t0.\u304a\u305b\u3048_\u3048\u3042\u3068\u304a, t0.\u3066\u3068\u3042\u3064\u3068_\u3048\u3042\u3068\u304a, t0.\u3059\u3042\u305b\u3042\u304d\u304a\u3064_\u3051\u3048, t0.\u304a\u305b\u3048_\u3068\u3051\u3059\u304a, t0.\u3066\u3068\u3042\u3064\u3068_\u3068\u3051\u3059\u304a, t0.\u3042\u3048\u3048\u3064_\u3051\u3048 FROM \u304a\u3059\u305f t0, \u3066\u3042\u3057\u3042\u3064\u306e t1 WHERE t1.\u304a\u3059\u305f_\u3051\u3048 = t0.\u304a\u3059\u305f_\u3051\u3048 AND t0.\u304b_\u305b\u3042\u3059\u304a = '" + employee.getFirstName() + "' AND t0.\u3057_\u305b\u3042\u3059\u304a = '" + employee.getLastName() + "'")));
Project project = (Project) manager.getObject(largeProjectClass, "0001");
ReadObjectTest test = new ReadObjectTest(project);
test.setQuery(new org.eclipse.persistence.queries.ReadObjectQuery(Project.class, new ExpressionBuilder().get("id").equal(project.getId())));
suite.addTest(test);
suite.addTest(new ReadObjectTest(manager.getObject(smallProjectClass, "0001")));
suite.addTest(new ReadObjectTest(manager.getObject(smallProjectClass, "0002")));
suite.addTest(new ReadObjectTest(manager.getObject(smallProjectClass, "0003")));
suite.addTest(new ReadObjectTest(manager.getObject(largeProjectClass, "0001")));
suite.addTest(new ReadObjectTest(manager.getObject(largeProjectClass, "0002")));
suite.addTest(new ReadObjectTest(manager.getObject(largeProjectClass, "0003")));
return suite;
}
use of org.eclipse.persistence.tools.schemaframework.PopulationManager in project eclipselink by eclipse-ee4j.
the class NLSEmployeeBasicTestModel method getDeleteObjectTestSuite.
public static TestSuite getDeleteObjectTestSuite() {
TestSuite suite = new TestSuite();
suite.setName("EmployeeDeleteObjectTestSuite");
suite.setDescription("[NLS_Japanese] This suite tests the deletion of each object in the employee demo.");
Class<NLSEmployee> employeeClass = NLSEmployee.class;
Class<LargeProject> largeProjectClass = LargeProject.class;
Class<SmallProject> smallProjectClass = SmallProject.class;
PopulationManager manager = PopulationManager.getDefaultManager();
suite.addTest(new NLSEmployeeDeleteTest(manager.getObject(employeeClass, "0001")));
suite.addTest(new NLSEmployeeDeleteTest(manager.getObject(employeeClass, "0002")));
suite.addTest(new NLSEmployeeDeleteTest(manager.getObject(employeeClass, "0003")));
suite.addTest(new NLSEmployeeDeleteTest(manager.getObject(employeeClass, "0004")));
suite.addTest(new NLSEmployeeDeleteTest(manager.getObject(employeeClass, "0005")));
suite.addTest(new NLSProjectDeleteTest(manager.getObject(smallProjectClass, "0001")));
suite.addTest(new NLSProjectDeleteTest(manager.getObject(smallProjectClass, "0002")));
suite.addTest(new NLSProjectDeleteTest(manager.getObject(smallProjectClass, "0003")));
suite.addTest(new NLSProjectDeleteTest(manager.getObject(largeProjectClass, "0001")));
suite.addTest(new NLSProjectDeleteTest(manager.getObject(largeProjectClass, "0002")));
suite.addTest(new NLSProjectDeleteTest(manager.getObject(largeProjectClass, "0003")));
return suite;
}
use of org.eclipse.persistence.tools.schemaframework.PopulationManager in project eclipselink by eclipse-ee4j.
the class OuterJoinWithMultipleTablesTestModel method getReadObjectTestSuite.
public static TestSuite getReadObjectTestSuite() {
TestSuite suite = new TestSuite();
suite.setName("OuterJoinWithMultipleTablesReadObjectTestSuite");
suite.setDescription("This suite tests the reading of each object in the outer join test model.");
PopulationManager manager = PopulationManager.getDefaultManager();
suite.addTest(new ReadObjectTest(manager.getObject(Student.class, "example1")));
suite.addTest(new ReadObjectTest(manager.getObject(Student.class, "example5")));
suite.addTest(new ReadObjectTest(manager.getObject(Student.class, "example3")));
return suite;
}
use of org.eclipse.persistence.tools.schemaframework.PopulationManager in project eclipselink by eclipse-ee4j.
the class OuterJoinWithMultipleTablesTestModel method getUpdateObjectTestSuite.
public static TestSuite getUpdateObjectTestSuite() {
TestSuite suite = new TestSuite();
suite.setName("OuterJoinWithMultipleTablesUpdateObjectTestSuite");
suite.setDescription("This suite tests the updating of each object in the Outer join test model.");
PopulationManager manager = PopulationManager.getDefaultManager();
suite.addTest(new WriteObjectTest(manager.getObject(Student.class, "example2")));
suite.addTest(new UnitOfWorkBasicUpdateObjectTest(manager.getObject(Student.class, "example2")));
suite.addTest(new UnitOfWorkBasicUpdateObjectTest(manager.getObject(Student.class, "example3")));
suite.addTest(new UnitOfWorkBasicUpdateObjectTest(manager.getObject(Student.class, "example4")));
suite.addTest(new UnitOfWorkBasicUpdateObjectTest(manager.getObject(Student.class, "example5")));
return suite;
}
Aggregations