use of org.eclipse.persistence.testing.models.employee.domain.LargeProject in project eclipselink by eclipse-ee4j.
the class SessionsXMLBasicTestModel 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("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;
}
use of org.eclipse.persistence.testing.models.employee.domain.LargeProject in project eclipselink by eclipse-ee4j.
the class SessionsXMLBasicTestModel method getSRGReadObjectTestSuite.
// SRG test set is maintained by QA only, do NOT add any new tests into it.
public static TestSuite getSRGReadObjectTestSuite() {
TestSuite suite = new TestSuite();
suite.setName("EmployeeReadObjectTestSuite");
suite.setDescription("This suite test the reading 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 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")));
Project project = (Project) manager.getObject(largeProjectClass, "0001");
ReadObjectTest test = new ReadObjectTest(project);
test.setQuery(new org.eclipse.persistence.queries.ReadObjectQuery(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 SessionsXMLBasicTestModel method getSRGDeleteObjectTestSuite.
// SRG test set is maintained by QA only, do NOT add any new tests into it.
public static TestSuite getSRGDeleteObjectTestSuite() {
TestSuite suite = new TestSuite();
suite.setName("EmployeeDeleteObjectTestSuite");
suite.setDescription("This suite tests the deletion 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 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 SessionBrokerPlatformTest method test.
@Override
public void test() {
try {
UnitOfWork uow = getSession().acquireUnitOfWork();
LargeProject project = (LargeProject) uow.readObject(LargeProject.class);
project.setDescription("Anything but what it was");
project.setMilestoneVersion(new java.sql.Timestamp(System.currentTimeMillis()));
uow.commit();
} catch (DatabaseException exception) {
throw new TestErrorException("Failed to use the Session Platform to generate SQL. Instead used Broker platform");
}
}
use of org.eclipse.persistence.testing.models.employee.domain.LargeProject in project eclipselink by eclipse-ee4j.
the class SessionsXMLBasicTestModel 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 = Employee.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")));
Project project = (Project) manager.getObject(largeProjectClass, "0001");
ReadObjectTest test = new ReadObjectTest(project);
test.setQuery(new org.eclipse.persistence.queries.ReadObjectQuery(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;
}
Aggregations