Search in sources :

Example 1 with EvaluationClient

use of org.eclipse.persistence.testing.models.aggregate.EvaluationClient in project eclipselink by eclipse-ee4j.

the class AggregateTestModel 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("AggregateReadObjectTestSuite");
    suite.setDescription("This suite test the reading 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 ReadObjectTest(manager.getObject(employee1Class, "example1")));
    suite.addTest(new ReadObjectTest(manager.getObject(employee1Class, "example2")));
    // ==================================================================================
    suite.addTest(new ReadObjectTest(manager.getObject(employeeClass, "example1")));
    suite.addTest(new ReadObjectTest(manager.getObject(employeeClass, "example2")));
    suite.addTest(new ReadObjectTest(manager.getObject(employeeClass, "example3")));
    suite.addTest(new ReadObjectTest(manager.getObject(clientClass, "example1")));
    suite.addTest(new ReadObjectTest(manager.getObject(clientClass, "example2")));
    suite.addTest(new ReadObjectTest(manager.getObject(clientClass, "example3")));
    suite.addTest(new ReadObjectTest(manager.getObject(evaluationClientClass, "example1")));
    suite.addTest(new ReadObjectTest(manager.getObject(evaluationClientClass, "example2")));
    suite.addTest(new ReadObjectTest(manager.getObject(evaluationClientClass, "example3")));
    // aggregate collection read
    suite.addTest(new ReadObjectTest(manager.getObject(Agent.class, "example1")));
    if (useNewAggregateCollection) {
        suite.addTest(new ReadObjectTest(manager.getObject(Builder.class, "example1")));
    }
    return suite;
}
Also used : Employee(org.eclipse.persistence.testing.models.aggregate.Employee) TestSuite(org.eclipse.persistence.testing.framework.TestSuite) 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) ReadObjectTest(org.eclipse.persistence.testing.framework.ReadObjectTest) Employee1(org.eclipse.persistence.testing.models.aggregate.Employee1)

Example 2 with EvaluationClient

use of org.eclipse.persistence.testing.models.aggregate.EvaluationClient in project eclipselink by eclipse-ee4j.

the class AggregateTestModel 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("AggregateDeleteObjectTestSuite");
    suite.setDescription("This suite tests the deletion of each object in the aggregate model.");
    Class<Employee> employeeClass = Employee.class;
    Class<Client> clientClass = Client.class;
    Class<EvaluationClient> evaluationClientClass = EvaluationClient.class;
    PopulationManager manager = PopulationManager.getDefaultManager();
    suite.addTest(new DeleteObjectTest(manager.getObject(employeeClass, "example1")));
    suite.addTest(new DeleteObjectTest(manager.getObject(employeeClass, "example2")));
    suite.addTest(new DeleteObjectTest(manager.getObject(employeeClass, "example3")));
    suite.addTest(new DeleteObjectTest(manager.getObject(clientClass, "example1")));
    suite.addTest(new DeleteObjectTest(manager.getObject(clientClass, "example2")));
    suite.addTest(new DeleteObjectTest(manager.getObject(clientClass, "example3")));
    suite.addTest(new DeleteObjectTest(manager.getObject(evaluationClientClass, "example1")));
    suite.addTest(new DeleteObjectTest(manager.getObject(evaluationClientClass, "example2")));
    suite.addTest(new DeleteObjectTest(manager.getObject(evaluationClientClass, "example3")));
    // aggregate 1:m delete test
    suite.addTest(new DeleteObjectTest(manager.getObject(Agent.class, "example1")));
    suite.addTest(new VerifyCascadeDelete(Agent.class));
    suite.addTest(new AggregateCollectionClearTest(Agent.class));
    if (useNewAggregateCollection) {
        suite.addTest(new DeleteObjectTest(manager.getObject(Builder.class, "example1")));
        suite.addTest(new VerifyCascadeDelete(Builder.class));
        suite.addTest(new AggregateCollectionClearTest(Builder.class));
    }
    return suite;
}
Also used : Agent(org.eclipse.persistence.testing.models.aggregate.Agent) Builder(org.eclipse.persistence.testing.models.aggregate.Builder) DeleteObjectTest(org.eclipse.persistence.testing.framework.DeleteObjectTest) Employee(org.eclipse.persistence.testing.models.aggregate.Employee) TestSuite(org.eclipse.persistence.testing.framework.TestSuite) 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)

Example 3 with EvaluationClient

use of org.eclipse.persistence.testing.models.aggregate.EvaluationClient 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

TestSuite (org.eclipse.persistence.testing.framework.TestSuite)3 Client (org.eclipse.persistence.testing.models.aggregate.Client)3 Employee (org.eclipse.persistence.testing.models.aggregate.Employee)3 EvaluationClient (org.eclipse.persistence.testing.models.aggregate.EvaluationClient)3 PopulationManager (org.eclipse.persistence.tools.schemaframework.PopulationManager)3 Employee1 (org.eclipse.persistence.testing.models.aggregate.Employee1)2 DeleteObjectTest (org.eclipse.persistence.testing.framework.DeleteObjectTest)1 ReadObjectTest (org.eclipse.persistence.testing.framework.ReadObjectTest)1 UnitOfWorkBasicUpdateObjectTest (org.eclipse.persistence.testing.framework.UnitOfWorkBasicUpdateObjectTest)1 WriteObjectTest (org.eclipse.persistence.testing.framework.WriteObjectTest)1 Agent (org.eclipse.persistence.testing.models.aggregate.Agent)1 Builder (org.eclipse.persistence.testing.models.aggregate.Builder)1