Search in sources :

Example 11 with WriteObjectTest

use of org.eclipse.persistence.testing.framework.WriteObjectTest in project eclipselink by eclipse-ee4j.

the class NLSEmployeeBasicTestModel method getUpdateObjectTestSuite.

public static TestSuite getUpdateObjectTestSuite() {
    TestSuite suite = new TestSuite();
    suite.setName("EmployeeUpdateObjectTestSuite");
    suite.setDescription("[NLS_Japanese] This suite tests the updating 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 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;
}
Also used : WriteObjectTest(org.eclipse.persistence.testing.framework.WriteObjectTest) PopulationManager(org.eclipse.persistence.tools.schemaframework.PopulationManager)

Example 12 with WriteObjectTest

use of org.eclipse.persistence.testing.framework.WriteObjectTest 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;
}
Also used : Employee(org.eclipse.persistence.testing.models.aggregate.Employee) UnitOfWorkBasicUpdateObjectTest(org.eclipse.persistence.testing.framework.UnitOfWorkBasicUpdateObjectTest) TestSuite(org.eclipse.persistence.testing.framework.TestSuite) WriteObjectTest(org.eclipse.persistence.testing.framework.WriteObjectTest) PopulationManager(org.eclipse.persistence.tools.schemaframework.PopulationManager) EvaluationClient(org.eclipse.persistence.testing.models.aggregate.EvaluationClient) Client(org.eclipse.persistence.testing.models.aggregate.Client) EvaluationClient(org.eclipse.persistence.testing.models.aggregate.EvaluationClient) Employee1(org.eclipse.persistence.testing.models.aggregate.Employee1)

Aggregations

WriteObjectTest (org.eclipse.persistence.testing.framework.WriteObjectTest)12 TestSuite (org.eclipse.persistence.testing.framework.TestSuite)8 PopulationManager (org.eclipse.persistence.tools.schemaframework.PopulationManager)8 UnitOfWorkBasicUpdateObjectTest (org.eclipse.persistence.testing.framework.UnitOfWorkBasicUpdateObjectTest)3 Employee (org.eclipse.persistence.testing.models.employee.domain.Employee)3 LargeProject (org.eclipse.persistence.testing.models.employee.domain.LargeProject)3 SmallProject (org.eclipse.persistence.testing.models.employee.domain.SmallProject)3 Vector (java.util.Vector)1 DeleteObjectTest (org.eclipse.persistence.testing.framework.DeleteObjectTest)1 InsertObjectTest (org.eclipse.persistence.testing.framework.InsertObjectTest)1 ReadObjectTest (org.eclipse.persistence.testing.framework.ReadObjectTest)1 Client (org.eclipse.persistence.testing.models.aggregate.Client)1 Employee (org.eclipse.persistence.testing.models.aggregate.Employee)1 Employee1 (org.eclipse.persistence.testing.models.aggregate.Employee1)1 EvaluationClient (org.eclipse.persistence.testing.models.aggregate.EvaluationClient)1 Claim (org.eclipse.persistence.testing.models.insurance.Claim)1 HousePolicy (org.eclipse.persistence.testing.models.insurance.HousePolicy)1 Policy (org.eclipse.persistence.testing.models.insurance.Policy)1 PolicyHolder (org.eclipse.persistence.testing.models.insurance.PolicyHolder)1 Employee (org.eclipse.persistence.testing.models.legacy.Employee)1