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 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 getReadObjectTestSuite() {
    TestSuite suite = new TestSuite();
    suite.setName("InterfaceWithoutTablesReadObjectTestSuite");
    suite.setDescription(
        "This suite test the reading of each object in the interface model (without tables).");

    PopulationManager manager = PopulationManager.getDefaultManager();

    suite.addTest(new ReadObjectTest(manager.getObject(Actor.class, "example4")));
    suite.addTest(new ReadObjectTest(manager.getObject(Documentary.class, "example1")));
    suite.addTest(new ReadObjectTest(manager.getObject(Film.class, "example1")));
    suite.addTest(new ReadObjectTest(manager.getObject(Employee.class, "example2")));
    suite.addTest(new ReadObjectTest(manager.getObject(CourseDeveloper.class, "example1")));
    suite.addTest(new ReadObjectTest(manager.getObject(Email.class, "example1")));
    suite.addTest(new ReadObjectTest(manager.getObject(PersonnelManager.class, "example1")));
    suite.addTest(new ReadObjectTest(manager.getObject(Phone.class, "example1")));
    suite.addTest(new ReadObjectTest(manager.getObject(ProductDeveloper.class, "example1")));
    suite.addTest(new ReadObjectTest(manager.getObject(ProductManager.class, "example1")));
    suite.addTest(new ReadObjectTest(manager.getObject(Receptionist.class, "example1")));
    suite.addTest(new ReadObjectTest(manager.getObject(Secretary.class, "example1")));
    suite.addTest(new ReadObjectTest(manager.getObject(Employee.class, "example4")));
    suite.addTest(new ReadObjectTest(manager.getObject(Employee.class, "example1")));

    suite.addTest(getReadInterfaceObjectTest());

    return suite;
  }
 public static TestSuite getSequenceTestSuite() {
   TestSuite suite;
   suite = new TestSuite();
   suite.setName("SequenceTestSuite");
   suite.setDescription("This tests both custom and regular sequencing.");
   suite.addTest(new CustomSequenceTest());
   suite.addTest(new SequencingConcurrencyTest(7, 100, false, false));
   suite.addTest(new SequencingConcurrencyTest(7, 100, false, false, 2));
   suite.addTest(new SequencingConcurrencyTest(7, 100, false, true));
   suite.addTest(new SequencingConcurrencyTest(7, 100, true, false));
   suite.addTest(new SequencingConcurrencyTest(7, 100, true, false, 2));
   suite.addTest(new SequencingConcurrencyTest(7, 100, true, true));
   suite.addTest(new SequencingRollbackTest(true));
   suite.addTest(new SequencingRollbackTest(false));
   suite.addTest(new SequenceStringPKInsertTest());
   suite.addTest(new SequenceStringExistingPKTest());
   suite.addTest(new CustomSequencingPolicyTest());
   suite.addTest(new InitializeDescriptorsBeforeLoginTest());
   suite.addTest(new SequencingTableQualifierTest(SequencingTableQualifierTest.TABLE_SEQUENCE));
   suite.addTest(
       new SequencingTableQualifierTest(SequencingTableQualifierTest.UNARY_TABLE_SEQUENCE));
   suite.addTest(new SequenceFieldRemovalForAcquireValueAfterInsertTest());
   suite.addTest(new CannotOverrideConnectedSequenceTest());
   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 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 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 getSessionAPITestSuite() {
    TestSuite suite = new TestSuite();
    suite.setName("Session API Test Suite");

    suite.setDescription("Test Session API.");
    suite.addTest(new GetClassDescriptorForAliasTest());
    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 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;
  }
 // For CR#4334, test reading through write connection when in transaction and
 // using a client/server setup.
 //
 public static TestSuite getReadingThroughWriteConnectionSuite() {
   TestSuite suite;
   suite = new TestSuite();
   suite.setName("ReadingThroughWriteConnectionSuite");
   suite.setDescription(
       "This suite tests reading through write connection when in transaction and using a client/server.");
   suite.addTests(ReadingThroughWriteConnectionInTransactionTest.buildTests());
   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 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 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 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 static TestSuite getCustomSequenceTestSuite() {
    TestSuite suite;

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

    suite.addTest(new CustomSequenceTest());

    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 getIntegrityCheckerTestSuite() {
    TestSuite suite;

    suite = new TestSuite();
    suite.setName("Integrity Checker");
    suite.setDescription("This Suite tests the functionality of Integrity Checker.");

    suite.addTest(new IntegrityCheckerTest());
    suite.addTest(new IntegrityCheckerLazyCreationTest());
    suite.addTest(new ShouldThroughIntegrityCheckerTest());
    suite.addTest(new ShouldNotThroughIntegrityCheckerTest());
    suite.addTest(new ShouldCheckDatabaseTest());
    suite.addTest(new ShouldNotCheckDatabaseTest());

    return suite;
  }
  public static TestSuite getReadAllTestSuite() {
    TestSuite suite = new TestSuite();
    suite.setName("InterfaceWithoutTablesReadAllTestSuite");
    suite.setDescription(
        "This suite tests the reading of all the objects of each class in the interface model (without tables).");

    ReadAllQuery query = new ReadAllQuery();
    query.setReferenceClass(Unionized.class);
    query.useCollectionClass(java.util.ArrayList.class);
    ReadAllTest aTest = new ReadAllTest(Unionized.class, 6);
    aTest.setQuery(query);
    suite.addTest(aTest);

    suite.addTest(new ReadAllTest(Actor.class, 4));
    suite.addTest(new ReadAllTest(Documentary.class, 1));
    suite.addTest(new ReadAllTest(Film.class, 3));
    suite.addTest(new ReadAllTest(Job.class, 18));
    suite.addTest(new ReadAllTest(ManagerialJob.class, 6));
    suite.addTest(new ReadAllTest(VIP.class, 3));
    // Used to test Cursored Streams
    ReadAllTest test = new ReadAllTest(VIP.class, 3);
    test.setQuery(new ReadAllQuery());
    test.getQuery().setReferenceClass(VIP.class);
    test.getQuery().useCursoredStream();
    suite.addTest(test);

    // Test the non-availability of batch reading
    test = new ReadAllBatchTest(Employee.class, 3);
    test.setName("Batch Read Test");
    test.setQuery(new ReadAllQuery());
    test.getQuery().setReferenceClass(Employee.class);
    test.getQuery().addBatchReadAttribute("contact");
    suite.addTest(test);

    suite.addTest(new OneToManyVariableBackBatchReadingTest());

    // Test cascading
    test = new ReadAllTest(Employee.class, 4);
    test.setQuery(new ReadAllQuery());
    test.getQuery().setReferenceClass(Employee.class);
    test.getQuery().cascadeAllParts();
    suite.addTest(test);

    suite.addTest(new ReadAllTest(Employee.class, 4));
    suite.addTest(new ReadAllConformInUowTest());
    return suite;
  }
  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 employeeClass = Employee.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")));

    Employee employee = (Employee) manager.getObject(employeeClass, "0001");
    suite.addTest(
        new ReadObjectCallTest(
            employeeClass,
            new SQLCall(
                "SELECT VERSION, EMP_ID, L_NAME, F_NAME FROM UNIDIR_EMPLOYEE WHERE F_NAME = '"
                    + employee.getFirstName()
                    + "' AND L_NAME = '"
                    + employee.getLastName()
                    + "'")));
    employee = (Employee) manager.getObject(employeeClass, "0002");
    suite.addTest(
        new ReadObjectCallTest(
            employeeClass,
            new SQLCall(
                "SELECT VERSION, EMP_ID, L_NAME, F_NAME FROM UNIDIR_EMPLOYEE WHERE F_NAME = '"
                    + employee.getFirstName()
                    + "' AND L_NAME = '"
                    + employee.getLastName()
                    + "'")));
    employee = (Employee) manager.getObject(employeeClass, "0003");
    suite.addTest(
        new ReadObjectCallTest(
            employeeClass,
            new SQLCall(
                "SELECT VERSION, EMP_ID, L_NAME, F_NAME FROM UNIDIR_EMPLOYEE WHERE F_NAME = '"
                    + employee.getFirstName()
                    + "' AND L_NAME = '"
                    + employee.getLastName()
                    + "'")));

    return suite;
  }
  public static TestSuite getTestSuite() {
    TestSuite suite = new TestSuite();
    suite.setName("ManualVerificationTestSuite");
    suite.setDescription(
        "This suite test runs various test cases which needs to be verified manually");

    suite.addTest(new NewObjectDeleteTest());
    suite.addTest(new BidirectionalUnitOfWorkManualTest());
    suite.addTest(new UnregisterUnitOfWorkTest());
    suite.addTest(new ReadToSeeMultipleIDsTest());
    suite.addTest(new ReadToSeeMultipleFieldsTest());
    suite.addTest(new BidirectionalMMDeleteTest());
    suite.addTest(new SQLLogToFileTest());
    suite.addTest(new CommitOrderTest());
    suite.addTest(new DeleteOrderUnitOfWorkTest());
    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;
  }
  public static TestSuite getMiscTestSuite() {
    TestSuite suite;

    suite = new TestSuite();
    suite.setName("MiscellaneousTests");
    suite.setDescription("Tests that don't fit anywhere else.  Okay, sue me.");

    suite.addTest(new OptomizeValueHolderTest());
    suite.addTest(new NullPasswordLoginTest());
    suite.addTest(new HelperSystemPropertyTest());
    suite.addTest(new GermanUmlautsWriteTest());
    suite.addTest(new ReconnectFlushStatementCacheTest());
    suite.addTest(new TransactionIsolationTest());
    suite.addTest(new SessionIsConnectedFlagTest());
    suite.addTest(new ContainerIndirectionPolicySerializationTest());

    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;
  }