Search in sources :

Example 1 with InsertObjectTest

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

the class MappingTestModel method getInsertObjectTestSuite.

public static TestSuite getInsertObjectTestSuite() {
    TestSuite suite = new TestSuite();
    suite.setName("MappingInsertObjectTestSuite");
    suite.setDescription("This suite tests the insertion of each object in the mapping model.");
    suite.addTest(new InsertObjectTest(Employee.example7()));
    suite.addTest(new InsertObjectTest(Employee.example8()));
    suite.addTest(new InsertObjectTest(Employee.example9()));
    suite.addTest(new InsertObjectTest(Shipment.example1()));
    suite.addTest(new ObjectTypeMappingDefaultNullValues());
    suite.addTest(new MTMPrivateOwnedWithValueholderDeleteObjectTest());
    return suite;
}
Also used : InsertObjectTest(org.eclipse.persistence.testing.framework.InsertObjectTest) TestSuite(org.eclipse.persistence.testing.framework.TestSuite)

Example 2 with InsertObjectTest

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

the class CustomSQLTestModel method getInsertObjectTestSuite.

public static TestSuite getInsertObjectTestSuite() {
    TestSuite suite = new TestSuite();
    suite.setName("CustomSQLInsertObjectTestSuite");
    suite.setDescription("This suite tests insert SQL.");
    org.eclipse.persistence.testing.models.employee.domain.EmployeePopulator system = new org.eclipse.persistence.testing.models.employee.domain.EmployeePopulator();
    suite.addTest(new InsertObjectTest(system.basicEmployeeExample4()));
    suite.addTest(new InsertObjectTest(system.basicEmployeeExample5()));
    return suite;
}
Also used : InsertObjectTest(org.eclipse.persistence.testing.framework.InsertObjectTest) org.eclipse.persistence.testing.models.employee.domain(org.eclipse.persistence.testing.models.employee.domain)

Example 3 with InsertObjectTest

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

the class EmployeeChangeFlagBasicTestModel method getInsertObjectTestSuite.

public static TestSuite getInsertObjectTestSuite() {
    TestSuite suite = new TestSuite();
    suite.setName("EmployeeInsertObjectTestSuite");
    suite.setDescription("This suite tests the insertion of each object in the employee demo.");
    EmployeePopulator system = new EmployeePopulator();
    suite.addTest(new InsertObjectTest(system.basicEmployeeExample1()));
    suite.addTest(new InsertObjectTest(system.basicEmployeeExample2()));
    suite.addTest(new InsertObjectTest(system.basicEmployeeExample3()));
    suite.addTest(new InsertObjectTest(system.basicEmployeeExample4()));
    suite.addTest(new InsertObjectTest(system.basicEmployeeExample5()));
    suite.addTest(new InsertObjectTest(system.basicSmallProjectExample1()));
    suite.addTest(new InsertObjectTest(system.basicSmallProjectExample2()));
    suite.addTest(new InsertObjectTest(system.basicSmallProjectExample3()));
    suite.addTest(new InsertObjectTest(system.basicLargeProjectExample1()));
    suite.addTest(new InsertObjectTest(system.basicLargeProjectExample2()));
    suite.addTest(new InsertObjectTest(system.basicLargeProjectExample3()));
    return suite;
}
Also used : InsertObjectTest(org.eclipse.persistence.testing.framework.InsertObjectTest) TestSuite(org.eclipse.persistence.testing.framework.TestSuite) EmployeePopulator(org.eclipse.persistence.testing.models.employee.domain.EmployeePopulator)

Example 4 with InsertObjectTest

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

the class MappingTestModel method getAdditionalJoinTest.

public static TestSuite getAdditionalJoinTest() {
    TestSuite suite = new TestSuite();
    suite.setName("AdditionalJoinTestSuite");
    suite.setDescription("This suite tests the addition of an additionalJoinExpression.");
    suite.addTest(new AdditionalJoinExpressionTest());
    PopulationManager manager = PopulationManager.getDefaultManager();
    suite.addTest(new MultipleTableReadObjectTest(manager.getObject(Employee1.class, "example1"), "amendEmployee1WithJoinWithInsert"));
    suite.addTest(new MultipleTableReadObjectTest(manager.getObject(Employee1.class, "example1"), "amendEmployee1WithFKInfo"));
    suite.addTest(new MultipleTableReadObjectTest(manager.getObject(Employee1.class, "example1"), "amendEmployee1WithJoinOnly"));
    suite.addTest(new MultipleTableInsertObjectTest(manager.getObject(Employee1.class, "example2"), "amendEmployee1WithJoinWithInsert"));
    suite.addTest(new MultipleTableInsertObjectTest(manager.getObject(Employee1.class, "example2"), "amendEmployee1WithFKInfo"));
    suite.addTest(new MultipleTableReadAllTest(Employee1.class, 2, "amendEmployee1WithJoinWithInsert"));
    suite.addTest(new MultipleTableReadAllTest(Employee1.class, 2, "amendEmployee1WithJoinOnly"));
    suite.addTest(new MultipleTableReadAllTest(Employee1.class, 2, "amendEmployee1WithFKInfo"));
    // The delete with join info would not work because of the lack of PK info.
    suite.addTest(new MultipleTableDeleteObjectTest(manager.getObject(Employee1.class, "example3"), "amendEmployee1WithFKInfo"));
    // The update with join info would not work because of the lack of PK info.
    suite.addTest(new MultipleTableWriteObjectTest(manager.getObject(Employee1.class, "example3"), "amendEmployee1WithFKInfo"));
    // Add tests for multiple table with fk from secondary table to primary table.
    suite.addTest(new ReadObjectTest(manager.getObject(Employee2.class, "example1")));
    suite.addTest(new WriteObjectTest(manager.getObject(Employee2.class, "example1")));
    suite.addTest(new UnitOfWorkBasicUpdateObjectTest(manager.getObject(Employee2.class, "example1")));
    suite.addTest(new DeleteObjectTest(manager.getObject(Employee2.class, "example1")));
    suite.addTest(new InsertObjectTest(manager.getObject(Employee2.class, "example2")));
    return suite;
}
Also used : WriteObjectTest(org.eclipse.persistence.testing.framework.WriteObjectTest) DeleteObjectTest(org.eclipse.persistence.testing.framework.DeleteObjectTest) ReadObjectTest(org.eclipse.persistence.testing.framework.ReadObjectTest) Employee1(org.eclipse.persistence.testing.models.mapping.Employee1) InsertObjectTest(org.eclipse.persistence.testing.framework.InsertObjectTest) UnitOfWorkBasicUpdateObjectTest(org.eclipse.persistence.testing.framework.UnitOfWorkBasicUpdateObjectTest) TestSuite(org.eclipse.persistence.testing.framework.TestSuite) PopulationManager(org.eclipse.persistence.tools.schemaframework.PopulationManager)

Example 5 with InsertObjectTest

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

the class LegacyTestModel method getInsertObjectTestSuite.

public static TestSuite getInsertObjectTestSuite() {
    TestSuite suite = new TestSuite();
    suite.setName("LegacyInsertObjectTestSuite");
    suite.setDescription("This suite tests the insertion of each object in the mapping model.");
    suite.addTest(new InsertObjectTest(Employee.example4()));
    suite.addTest(new InsertObjectTest(Employee.example5()));
    suite.addTest(new InsertObjectTest(Employee.example6()));
    return suite;
}
Also used : InsertObjectTest(org.eclipse.persistence.testing.framework.InsertObjectTest)

Aggregations

InsertObjectTest (org.eclipse.persistence.testing.framework.InsertObjectTest)10 TestSuite (org.eclipse.persistence.testing.framework.TestSuite)7 EmployeePopulator (org.eclipse.persistence.testing.models.employee.domain.EmployeePopulator)3 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 org.eclipse.persistence.testing.models.employee.domain (org.eclipse.persistence.testing.models.employee.domain)1 Employee1 (org.eclipse.persistence.testing.models.mapping.Employee1)1 PopulationManager (org.eclipse.persistence.tools.schemaframework.PopulationManager)1