use of org.eclipse.persistence.testing.models.employee.domain.LargeProject in project eclipselink by eclipse-ee4j.
the class EmployeeChangeFlagBasicTestModel method getReadObjectTestSuite.
public static TestSuite getReadObjectTestSuite() {
TestSuite suite = new TestSuite();
suite.setName("EmployeeReadObjectTestSuite");
suite.setDescription("This suite test the reading of each object in the employee demo.");
Class<Employee> employeeClass = org.eclipse.persistence.testing.models.employee.domain.Employee.class;
Class<LargeProject> largeProjectClass = org.eclipse.persistence.testing.models.employee.domain.LargeProject.class;
Class<SmallProject> smallProjectClass = org.eclipse.persistence.testing.models.employee.domain.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")));
Employee employee = (Employee) manager.getObject(employeeClass, "0001");
suite.addTest(new ReadObjectCallTest(employeeClass, new SQLCall("SELECT t0.VERSION, t1.EMP_ID, t0.L_NAME, t0.F_NAME, t1.SALARY, t0.EMP_ID, t0.GENDER, t0.END_DATE, t0.START_DATE, t0.MANAGER_ID, t0.END_TIME, t0.START_TIME, t0.ADDR_ID FROM EMPLOYEE t0, SALARY t1 WHERE t1.EMP_ID = t0.EMP_ID AND t0.F_NAME = '" + employee.getFirstName() + "' AND t0.L_NAME = '" + employee.getLastName() + "'")));
employee = (Employee) manager.getObject(employeeClass, "0002");
suite.addTest(new ReadObjectCallTest(employeeClass, new SQLCall("SELECT t0.VERSION, t1.EMP_ID, t0.L_NAME, t0.F_NAME, t1.SALARY, t0.EMP_ID, t0.GENDER, t0.END_DATE, t0.START_DATE, t0.MANAGER_ID, t0.END_TIME, t0.START_TIME, t0.ADDR_ID FROM EMPLOYEE t0, SALARY t1 WHERE t1.EMP_ID = t0.EMP_ID AND t0.F_NAME = '" + employee.getFirstName() + "' AND t0.L_NAME = '" + employee.getLastName() + "'")));
employee = (Employee) manager.getObject(employeeClass, "0003");
suite.addTest(new ReadObjectCallTest(employeeClass, new SQLCall("SELECT t0.VERSION, t1.EMP_ID, t0.L_NAME, t0.F_NAME, t1.SALARY, t0.EMP_ID, t0.GENDER, t0.END_DATE, t0.START_DATE, t0.MANAGER_ID, t0.END_TIME, t0.START_TIME, t0.ADDR_ID FROM EMPLOYEE t0, SALARY t1 WHERE t1.EMP_ID = t0.EMP_ID AND t0.F_NAME = '" + employee.getFirstName() + "' AND t0.L_NAME = '" + employee.getLastName() + "'")));
org.eclipse.persistence.testing.models.employee.domain.Project project = (org.eclipse.persistence.testing.models.employee.domain.Project) manager.getObject(largeProjectClass, "0001");
ReadObjectTest test = new ReadObjectTest(project);
test.setQuery(new org.eclipse.persistence.queries.ReadObjectQuery(org.eclipse.persistence.testing.models.employee.domain.Project.class, new org.eclipse.persistence.expressions.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.testing.models.employee.domain.LargeProject in project eclipselink by eclipse-ee4j.
the class EmployeeChangeFlagBasicTestModel method getDeleteObjectTestSuite.
public static TestSuite getDeleteObjectTestSuite() {
TestSuite suite = new TestSuite();
suite.setName("EmployeeDeleteObjectTestSuite");
suite.setDescription("This suite tests the deletion of each object in the employee demo.");
Class<Employee> employeeClass = org.eclipse.persistence.testing.models.employee.domain.Employee.class;
Class<LargeProject> largeProjectClass = org.eclipse.persistence.testing.models.employee.domain.LargeProject.class;
Class<SmallProject> smallProjectClass = org.eclipse.persistence.testing.models.employee.domain.SmallProject.class;
PopulationManager manager = PopulationManager.getDefaultManager();
suite.addTest(new EmployeeDeleteTest(manager.getObject(employeeClass, "0001")));
suite.addTest(new EmployeeDeleteTest(manager.getObject(employeeClass, "0002")));
suite.addTest(new EmployeeDeleteTest(manager.getObject(employeeClass, "0003")));
suite.addTest(new EmployeeDeleteTest(manager.getObject(employeeClass, "0004")));
suite.addTest(new EmployeeDeleteTest(manager.getObject(employeeClass, "0005")));
suite.addTest(new ProjectDeleteTest(manager.getObject(smallProjectClass, "0001")));
suite.addTest(new ProjectDeleteTest(manager.getObject(smallProjectClass, "0002")));
suite.addTest(new ProjectDeleteTest(manager.getObject(smallProjectClass, "0003")));
suite.addTest(new ProjectDeleteTest(manager.getObject(largeProjectClass, "0001")));
suite.addTest(new ProjectDeleteTest(manager.getObject(largeProjectClass, "0002")));
suite.addTest(new ProjectDeleteTest(manager.getObject(largeProjectClass, "0003")));
return suite;
}
use of org.eclipse.persistence.testing.models.employee.domain.LargeProject in project eclipselink by eclipse-ee4j.
the class EmployeeChangeFlagBasicTestModel method getUpdateObjectTestSuite.
public static TestSuite getUpdateObjectTestSuite() {
TestSuite suite = new TestSuite();
suite.setName("EmployeeUpdateObjectTestSuite");
suite.setDescription("This suite tests the updating of each object in the employee demo.");
Class<Employee> employeeClass = org.eclipse.persistence.testing.models.employee.domain.Employee.class;
Class<LargeProject> largeProjectClass = org.eclipse.persistence.testing.models.employee.domain.LargeProject.class;
Class<SmallProject> smallProjectClass = org.eclipse.persistence.testing.models.employee.domain.SmallProject.class;
PopulationManager manager = PopulationManager.getDefaultManager();
suite.addTest(new WriteObjectTest(manager.getObject(employeeClass, "0001")));
suite.addTest(new WriteObjectTest(manager.getObject(employeeClass, "0002")));
suite.addTest(new WriteObjectTest(manager.getObject(employeeClass, "0003")));
suite.addTest(new WriteObjectTest(manager.getObject(employeeClass, "0004")));
suite.addTest(new WriteObjectTest(manager.getObject(employeeClass, "0005")));
suite.addTest(new WriteObjectTest(manager.getObject(smallProjectClass, "0001")));
suite.addTest(new WriteObjectTest(manager.getObject(smallProjectClass, "0002")));
suite.addTest(new WriteObjectTest(manager.getObject(smallProjectClass, "0003")));
suite.addTest(new WriteObjectTest(manager.getObject(largeProjectClass, "0001")));
suite.addTest(new WriteObjectTest(manager.getObject(largeProjectClass, "0002")));
suite.addTest(new WriteObjectTest(manager.getObject(largeProjectClass, "0003")));
return suite;
}
use of org.eclipse.persistence.testing.models.employee.domain.LargeProject in project eclipselink by eclipse-ee4j.
the class SimultaneousTestsModel method getReadEmployeeTestSuite.
public static TestSuite getReadEmployeeTestSuite() {
TestSuite suite = new TestSuite();
suite.setName("Employee Multithread Test Suite");
suite.setDescription("This suite tests the reading of all the objects of each class in the employee demo.");
Vector tests = new Vector();
Class<Employee> employeeClass = org.eclipse.persistence.testing.models.employee.domain.Employee.class;
Class<LargeProject> largeProjectClass = org.eclipse.persistence.testing.models.employee.domain.LargeProject.class;
Class<SmallProject> smallProjectClass = org.eclipse.persistence.testing.models.employee.domain.SmallProject.class;
PopulationManager manager = PopulationManager.getDefaultManager();
tests.add(new ReadObjectTest(manager.getObject(employeeClass, "0001")));
tests.add(new ReadObjectTest(manager.getObject(employeeClass, "0002")));
tests.add(new ReadObjectTest(manager.getObject(employeeClass, "0003")));
tests.add(new ReadObjectTest(manager.getObject(employeeClass, "0004")));
tests.add(new ReadObjectTest(manager.getObject(employeeClass, "0005")));
org.eclipse.persistence.testing.models.employee.domain.Project project = (org.eclipse.persistence.testing.models.employee.domain.Project) manager.getObject(largeProjectClass, "0001");
ReadObjectTest test = new ReadObjectTest(project);
test.setQuery(new org.eclipse.persistence.queries.ReadObjectQuery(org.eclipse.persistence.testing.models.employee.domain.Project.class, new org.eclipse.persistence.expressions.ExpressionBuilder().get("id").equal(project.getId())));
tests.add(test);
tests.add(new ReadObjectTest(manager.getObject(smallProjectClass, "0001")));
tests.add(new ReadObjectTest(manager.getObject(smallProjectClass, "0002")));
tests.add(new ReadObjectTest(manager.getObject(smallProjectClass, "0003")));
tests.add(new ReadObjectTest(manager.getObject(largeProjectClass, "0001")));
tests.add(new ReadObjectTest(manager.getObject(largeProjectClass, "0002")));
tests.add(new ReadObjectTest(manager.getObject(largeProjectClass, "0003")));
tests.add(new ReadAllTest(org.eclipse.persistence.testing.models.employee.domain.Employee.class, 12));
tests.add(new ReadAllTest(org.eclipse.persistence.testing.models.employee.domain.Project.class, 15));
tests.add(new ReadAllTest(org.eclipse.persistence.testing.models.employee.domain.LargeProject.class, 5));
tests.add(new ReadAllTest(org.eclipse.persistence.testing.models.employee.domain.SmallProject.class, 10));
suite.addTest(new MultithreadTestCase(tests));
return suite;
}
use of org.eclipse.persistence.testing.models.employee.domain.LargeProject in project eclipselink by eclipse-ee4j.
the class SessionsXMLBasicTestModel method getUpdateObjectTestSuite.
public static TestSuite getUpdateObjectTestSuite() {
TestSuite suite = new TestSuite();
suite.setName("EmployeeUpdateObjectTestSuite");
suite.setDescription("This suite tests the updating of each object in the employee demo.");
Class<Employee> employeeClass = Employee.class;
Class<LargeProject> largeProjectClass = LargeProject.class;
Class<SmallProject> smallProjectClass = SmallProject.class;
PopulationManager manager = PopulationManager.getDefaultManager();
suite.addTest(new WriteObjectTest(manager.getObject(employeeClass, "0001")));
suite.addTest(new WriteObjectTest(manager.getObject(employeeClass, "0002")));
suite.addTest(new WriteObjectTest(manager.getObject(employeeClass, "0003")));
suite.addTest(new WriteObjectTest(manager.getObject(employeeClass, "0004")));
suite.addTest(new WriteObjectTest(manager.getObject(employeeClass, "0005")));
suite.addTest(new WriteObjectTest(manager.getObject(smallProjectClass, "0001")));
suite.addTest(new WriteObjectTest(manager.getObject(smallProjectClass, "0002")));
suite.addTest(new WriteObjectTest(manager.getObject(smallProjectClass, "0003")));
suite.addTest(new WriteObjectTest(manager.getObject(largeProjectClass, "0001")));
suite.addTest(new WriteObjectTest(manager.getObject(largeProjectClass, "0002")));
suite.addTest(new WriteObjectTest(manager.getObject(largeProjectClass, "0003")));
return suite;
}
Aggregations