public static TestSuite getExceptionHandlerTestSuite() {
   TestSuite suite;
   suite = new TestSuite();
   suite.setName("ExceptionHandler");
   suite.setDescription("This Suite tests the functionality of ExceptionHandler.");
   suite.addTest(new ExceptionHandlerTest1());
   suite.addTest(new ExceptionHandlerTest2());
   suite.addTest(new ExceptionHandlerLoginIntegrityTest());
   return suite;
 }
  public static TestSuite getProxyObjectTestSuite() {
    TestSuite suite = new TestSuite();
    suite.setName("Proxy Object Tests");
    suite.addTest(new DeleteProxyObjectTest());
    suite.addTest(new DoesExistProxyObjectTest());
    suite.addTest(new ReadProxyObjectTest());
    suite.addTest(new UOWRegisterProxyObjectTest());

    return suite;
  }
  public static TestSuite getNullValueTestSuite() {
    TestSuite suite;

    suite = new TestSuite();
    suite.setName("NullValueTestSuite");
    suite.setDescription("Test default null value settings");

    suite.addTest(new NullValueTest());
    suite.addTest(new NoDefaultNullValueTest());
    return suite;
  }
  public static TestSuite getUnitOfWorkTestSuite() {
    TestSuite suite = new TestSuite();
    suite.setName("UnitOfWork Tests");
    suite.addTest(new UnitOfWorkUpdateTest());
    suite.addTest(new UnitOfWorkUpdateWithNewObjectTest());
    suite.addTest(new UnitOfWorkCommitAndResume());
    suite.addTest(new UnitOfWorkUpdateFromCache());
    suite.addTest(new UnitOfWorkReplaceTest());

    return suite;
  }
  public static TestSuite getExceptionsTestSuite() {
    TestSuite suite = new TestSuite();
    suite.setName("ExceptionsTestSuite");
    suite.setDescription("Verifies whether the right exceptions are thrown");

    suite.addTest(new RMIConnectionExceptionsTest(TransporterGenerator.THROW_REMOTE_EXCEPTION));
    suite.addTest(
        new RMIConnectionExceptionsTest(TransporterGenerator.SET_EXCEPTION_INTO_TRANSPORTER));

    return suite;
  }
  public TestSuite getNullDelegateInValueHolderTestSuite() {
    TestSuite suite = new TestSuite();
    suite.setName("NullDelegateInValueHolderTestSuite");
    suite.setDescription("This suite tests setting a ValueHolder in a transparent collection");

    suite.addTest(new NullDelegateInValueHolderTest(IndirectList.class));
    suite.addTest(new NullDelegateInValueHolderTest(IndirectSet.class));
    suite.addTest(new NullDelegateInValueHolderTest(IndirectMap.class));

    return suite;
  }
 public static TestSuite getFieldedMessageLoggingTestSuite() {
   TestSuite suite;
   suite = new TestSuite();
   suite.setName("Fielded Message Logging");
   suite.setDescription(
       "This Suite tests the functionality of Logging messages containing formatting strings.");
   suite.addTest(new FieldedMessageLoggingTest());
   // This test exercises the code that does a key:value lookup for messages that are not
   // translated
   suite.addTest(new FieldedMessageLoggingTraceLocalizationTest());
   return suite;
 }
  public TestSuite getCustomIndirectContainerTestSuite() {
    TestSuite suite = new TestSuite();
    suite.setName("CustomIndirectContainerTestSuite");
    suite.setDescription("This suite tests custom IndirectContainers.");

    PopulationManager manager = PopulationManager.getDefaultManager();

    suite.addTest(new ReadObjectTest(manager.getObject(Dog.class, "Bart")));
    suite.addTest(new UpdateDogTest());
    suite.addTest(new NullCollectionTest());
    return suite;
  }
  public static TestSuite getOptimisticLockingTestSuite() {
    TestSuite suite;

    suite = new TestSuite();
    suite.setName("OptimisticLockingTestSuite");
    suite.setDescription("This suite tests the functionality of the optimistic locking feature.");

    suite.addTest(new OptimisticLockingDeleteRowTest());
    suite.addTest(new OptimisticLockingChangedValueTest());
    suite.addTest(new OptimisticLockingChangedValueUpdateTest());
    suite.addTest(new OptimisticLockingDeleteValueUpdateTest());

    return suite;
  }
  public static TestSuite getInsertObjectTestSuite() {
    TestSuite suite = new TestSuite();
    suite.setName("EmployeeUOWBasicInsertObjectTestSuite");
    suite.setDescription(
        "This suite tests the insertion of each object in the employee demo using uow.");
    EmployeePopulator system = new EmployeePopulator();

    suite.addTest(new UnitOfWorkBasicInsertObjectTest(system.basicEmployeeExample1()));
    suite.addTest(new UnitOfWorkBasicInsertObjectTest(system.basicEmployeeExample2()));
    suite.addTest(new UnitOfWorkBasicInsertObjectTest(system.basicEmployeeExample3()));
    suite.addTest(new UnitOfWorkBasicInsertObjectTest(system.basicEmployeeExample4()));
    suite.addTest(new UnitOfWorkBasicInsertObjectTest(system.basicEmployeeExample5()));

    return suite;
  }
  public static TestSuite getDeleteTestSuite() {
    TestSuite suite = new TestSuite();
    suite.setName("Delete Tests");
    suite.addTest(new DeleteTest());

    return suite;
  }
  public static TestSuite getSessionAPITestSuite() {
    TestSuite suite = new TestSuite();
    suite.setName("Session API Test Suite");

    suite.setDescription("Test Session API.");
    suite.addTest(new GetClassDescriptorForAliasTest());
    return suite;
  }
 public static TestSuite getMessageLoggingTestSuite() {
   TestSuite suite;
   suite = new TestSuite();
   suite.setName("Message Logging");
   suite.setDescription("This Suite tests the functionality of Logging messages.");
   suite.addTest(new MessageLoggingEfficiencyTest());
   return suite;
 }
 public static TestSuite getCopyingTestSuite() {
   TestSuite suite;
   suite = new TestSuite();
   suite.setName("CopyingTestSuite");
   suite.setDescription("This tests object copying.");
   suite.addTest(new ObjectCopyingTest());
   return suite;
 }
 public static TestSuite getDatabaseLoginCodeCoverageTestSuite() {
   TestSuite suite;
   suite = new TestSuite();
   suite.setName("DatabaseLoginCodeCoverageTestSuite");
   suite.setDescription("This tests code coverage for DatabaseLogin.");
   suite.addTest(new DatabaseLoginCodeCoverageTest());
   return suite;
 }
  public static TestSuite getInstantiationPoicyTestSuite() {
    TestSuite suite = new TestSuite();
    suite.setName("Instantiation Policy Test Suite");

    suite.setDescription("Test instantiation policy feature.");
    suite.addTest(new InstantiationPolicyTest());
    return suite;
  }
  public static TestSuite getWriteTestSuite() {
    TestSuite suite = new TestSuite();
    suite.setName("Write/Update Tests");
    suite.addTest(new InsertTest());
    suite.addTest(new UpdateTest());

    return suite;
  }
  public static TestSuite getDeleteObjectTestSuite() {
    TestSuite suite = new TestSuite();
    suite.setName("EmployeeDeleteObjectTestSuite");
    suite.setDescription(
        "[NLS_Japanese] This suite tests the deletion of each object in the employee demo.");

    Class employeeClass = NLSEmployee.class;

    Class largeProjectClass = LargeProject.class;
    Class smallProjectClass = SmallProject.class;
    PopulationManager manager = PopulationManager.getDefaultManager();

    suite.addTest(new NLSEmployeeDeleteTest(manager.getObject(employeeClass, "0001")));
    suite.addTest(new NLSEmployeeDeleteTest(manager.getObject(employeeClass, "0002")));
    suite.addTest(new NLSEmployeeDeleteTest(manager.getObject(employeeClass, "0003")));
    suite.addTest(new NLSEmployeeDeleteTest(manager.getObject(employeeClass, "0004")));
    suite.addTest(new NLSEmployeeDeleteTest(manager.getObject(employeeClass, "0005")));

    suite.addTest(new NLSProjectDeleteTest(manager.getObject(smallProjectClass, "0001")));
    suite.addTest(new NLSProjectDeleteTest(manager.getObject(smallProjectClass, "0002")));
    suite.addTest(new NLSProjectDeleteTest(manager.getObject(smallProjectClass, "0003")));

    suite.addTest(new NLSProjectDeleteTest(manager.getObject(largeProjectClass, "0001")));
    suite.addTest(new NLSProjectDeleteTest(manager.getObject(largeProjectClass, "0002")));
    suite.addTest(new NLSProjectDeleteTest(manager.getObject(largeProjectClass, "0003")));

    return suite;
  }
  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 employeeClass = Employee.class;
    Class largeProjectClass = LargeProject.class;
    Class 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;
  }
  public static TestSuite getReadAllTestSuite() {
    TestSuite suite = new TestSuite();
    suite.setName("EmployeeReadAllTestSuite");
    suite.setDescription(
        "This suite tests the reading of all the objects of each class in the employee demo.");

    suite.addTest(new ReadAllTest(Employee.class, 12));

    suite.addTest(
        new ReadAllCallTest(
            Employee.class,
            12,
            new SQLCall("SELECT VERSION, EMP_ID, L_NAME, F_NAME FROM UNIDIR_EMPLOYEE")));

    // Add new tests here ...
    Expression orderBy = new ExpressionBuilder().get("firstName").ascending();
    Call call = new SQLCall("SELECT VERSION, EMP_ID, L_NAME, F_NAME FROM UNIDIR_EMPLOYEE");
    suite.addTest(new ReadAllCallWithOrderingTest(Employee.class, 12, call, orderBy));

    suite.addTest(new JoinTest());
    suite.addTest(new JoinTest_SelectByFirstName());
    suite.addTest(new BatchReadingTest());
    suite.addTest(new BatchReadingTest_SelectByFirstName());

    return suite;
  }
  public static TestSuite getJNDIConnectionTestSuite() {
    TestSuite suite = new TestSuite();
    suite.setName("JNDIConnectionTestSuite");
    suite.setDescription("Test connecting to a database with a JNDI-supplied DataSource");

    suite.addTest(new JNDIConnectionTest());

    return suite;
  }
  public static TestSuite getManyDescriptorTestSuite() {
    TestSuite suite = new TestSuite();
    suite.setName("InterfaceWithoutTablesManyDescriptorTestSuite");
    suite.setDescription("This suite tests the support of many descriptors. (without tables).");

    suite.addTest(new DescriptorInitTest());

    return suite;
  }
  public TestSuite getBidirectionalRelationshipTestSuite() {
    TestSuite suite = new TestSuite();
    suite.setName("BidirectionalRelationshipTestSuite");
    suite.setDescription("This suite tests bidirectional relationship maintenance.");

    suite.addTest(new BidirectionalRelationshipMaintenanceTest());

    return suite;
  }
  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 employeeClass = org.eclipse.persistence.testing.models.unidirectional.Employee.class;
    PopulationManager manager = PopulationManager.getDefaultManager();

    suite.addTest(new DeleteObjectTest(manager.getObject(employeeClass, "0001")));
    suite.addTest(new DeleteObjectTest(manager.getObject(employeeClass, "0002")));
    suite.addTest(new DeleteObjectTest(manager.getObject(employeeClass, "0003")));
    suite.addTest(new DeleteObjectTest(manager.getObject(employeeClass, "0004")));
    suite.addTest(new DeleteObjectTest(manager.getObject(employeeClass, "0005")));

    suite.addTest(new TargetLockingTest_DeleteSource(true));
    suite.addTest(new TargetLockingTest_DeleteSource(false));

    return suite;
  }
  public static TestSuite getSRGReadAllTestSuite() {
    TestSuite suite = new TestSuite();
    suite.setName("EmployeeReadAllTestSuite");
    suite.setDescription(
        "This suite tests the reading of all the objects of each class in the employee demo.");

    suite.addTest(new ReadAllTest(Employee.class, 12));
    suite.addTest(new ReadAllTest(Project.class, 15));
    suite.addTest(new ReadAllTest(LargeProject.class, 5));
    suite.addTest(new ReadAllTest(SmallProject.class, 10));

    suite.addTest(
        new ReadAllCallTest(
            Employee.class,
            12,
            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")));

    return suite;
  }
  public static TestSuite getCustomSequenceTestSuite() {
    TestSuite suite;

    suite = new TestSuite();
    suite.setName("CustomSequenceTestSuite");
    suite.setDescription("This tests custom sequencing.");

    suite.addTest(new CustomSequenceTest());

    return suite;
  }
  public static TestSuite getReadAllTestSuite() {
    TestSuite suite = new TestSuite();
    suite.setName("EmployeeReadAllTestSuite");
    suite.setDescription(
        "[NLS_Japanese] This suite tests the reading of all the objects of each class in the employee demo.");

    suite.addTest(new ReadAllTest(NLSEmployee.class, 12));
    suite.addTest(new ReadAllTest(Project.class, 15));
    suite.addTest(new ReadAllTest(LargeProject.class, 5));
    suite.addTest(new ReadAllTest(SmallProject.class, 10));

    suite.addTest(
        new ReadAllCallTest(
            NLSEmployee.class,
            12,
            new SQLCall(
                "SELECT  t0.\u306b\u304a\u3064\u3066\u3051\u305d\u305b, t1.\u304a\u3059\u305f_\u3051\u3048, t0.\u3057_\u305b\u3042\u3059\u304a, t0.\u304b_\u305b\u3042\u3059\u304a, t1.\u3066\u3042\u3057\u3042\u3064\u306e, t0.\u304a\u3059\u305f_\u3051\u3048, t0.\u304d\u304a\u305b\u3048\u304a\u3064, t0.\u304a\u305b\u3048_\u3048\u3042\u3068\u304a, t0.\u3066\u3068\u3042\u3064\u3068_\u3048\u3042\u3068\u304a, t0.\u3059\u3042\u305b\u3042\u304d\u304a\u3064_\u3051\u3048, t0.\u304a\u305b\u3048_\u3068\u3051\u3059\u304a, t0.\u3066\u3068\u3042\u3064\u3068_\u3068\u3051\u3059\u304a, t0.\u3042\u3048\u3048\u3064_\u3051\u3048 FROM \u304a\u3059\u305f t0, \u3066\u3042\u3057\u3042\u3064\u306e t1 WHERE t1.\u304a\u3059\u305f_\u3051\u3048 = t0.\u304a\u3059\u305f_\u3051\u3048")));

    return suite;
  }
  public static TestSuite getInsertObjectTestSuite() {
    TestSuite suite = new TestSuite();

    suite.setName("InserfaceWithoutTablesInsertObjectTestSuite");
    suite.setDescription(
        "This suite tests the insertion of each object in the interface model (without tables).");

    suite.addTest(new InsertObjectTest(Film.example2()));
    suite.addTest(new InsertObjectTest(Secretary.example2()));
    suite.addTest(new InsertObjectTest(Company.example3()));
    suite.addTest(new InsertObjectTest(CourseDeveloper.example1()));
    suite.addTest(new InsertObjectTest(Email.example2()));
    // suite.addTest(new InsertObjectTest(Employee.example3())); Cannot use insert test on emp as
    // bi-1-1
    suite.addTest(new InsertObjectTest(PersonnelManager.example1()));
    suite.addTest(new InsertObjectTest(Phone.example1()));
    suite.addTest(new InsertObjectTest(ProductDeveloper.example3()));
    suite.addTest(new InsertObjectTest(ProductManager.example1()));
    suite.addTest(new InsertObjectTest(Receptionist.example1()));
    return suite;
  }
  public static TestSuite getComplexUpdateObjectTestSuite() {
    TestSuite suite = new TestSuite();
    suite.setName("EmployeeComplexUpdateTestSuite");
    suite.setDescription(
        "This suite tests the updating of each an employee by adding and/or removing managed employees and/or phones.");

    Class employeeClass = Employee.class;
    PopulationManager manager = PopulationManager.getDefaultManager();
    Employee originalEmployee = (Employee) manager.getObject(employeeClass, "0001");
    Employee otherEmployee = (Employee) manager.getObject(employeeClass, "0002");

    // add a managed Employee from other Employee managed List; remove the first managed Employee.
    suite.addTest(
        new EmployeeComplexUpdateTest(
            originalEmployee,
            otherEmployee.getManagedEmployees().get(0),
            originalEmployee.getManagedEmployees().get(0)));
    // remove the first Phone.
    suite.addTest(
        new EmployeeComplexUpdateTest(
            originalEmployee, (Object) null, originalEmployee.getPhoneNumbers().get(0)));
    // add a managed Employee from other Employee managed List and new phone;
    // remove the first two managed Employees and the first Phone.
    Employee newEmployee = new Employee();
    newEmployee.setFirstName("New");
    PhoneNumber newPhoneNumber = new PhoneNumber("home", "001", "0000001");
    suite.addTest(
        new EmployeeComplexUpdateTest(
            originalEmployee,
            new Object[] {otherEmployee.getManagedEmployees().get(0), newEmployee, newPhoneNumber},
            new Object[] {
              originalEmployee.getManagedEmployees().get(0),
              originalEmployee.getManagedEmployees().get(1),
              originalEmployee.getPhoneNumbers().get(0)
            }));
    suite.addTest(new CascadeLockingTest());
    suite.addTest(new TargetLockingTest_AddRemoveTarget());

    return suite;
  }
  public static TestSuite getVariable1To1TestSuite() {
    TestSuite suite = new TestSuite();
    suite.setName("InterfaceWithoutTablesVariable1To1TestSuite");
    suite.setDescription(
        "This suite tests certain aspects of the Variable 1 to 1 implementation using the interface model (without tables).");

    suite.addTest(new VariableOneToOneDeepMergeCloneTest());
    suite.addTest(new VariableOneToOneShallowWriteTest());
    suite.addTest(getV11QueryTest());
    suite.addTest(new QueryAccrossV11ProxyIndirectionTest());
    suite.addTest(new PostCommitEventPrimaryKeyTest());
    suite.addTest(new VariableOneToOneUpdateTest());
    suite.addTest(new VariableOneToOneDeleteTest());
    suite.addTest(new VariableOneToOneCodeCoverageTest());
    suite.addTest(new VariableOneToOneInsertTest());
    suite.addTest(new VariableOneToOneGetTypeFieldTest());
    return suite;
  }