src/test/java/test/thread/parallelization/ParallelByMethodsTestCase9Scenario1.java
//Verify that the same test class instance is associated with each of the test methods from the sample test class
Verify that the same test class instance is associated with each of the test methods from the sample test class
Verify that the same test class instance is associated with each of the test methods from the sample test class
@Test
    public void verifyOnlyOneInstanceOfTestClassForAllTestMethodsForAllSuites() {
        verifyNumberOfInstancesOfTestClassesForMethods(
                SUITE_A,
                SUITE_A_TEST_A,
                Arrays.asList(TestClassBSixMethodsWithMethodOnMethodDependenciesSample.class,
                        TestClassAThreeMethodsWithMethodOnMethodDependenciesSample.class),
                1);
        verifySameInstancesOfTestClassesAssociatedWithMethods(
                SUITE_A,
                SUITE_A_TEST_A,
                Arrays.asList(TestClassBSixMethodsWithMethodOnMethodDependenciesSample.class,
                        TestClassAThreeMethodsWithMethodOnMethodDependenciesSample.class)
        );
        verifyNumberOfInstancesOfTestClassesForMethods(
                SUITE_A,
                SUITE_A_TEST_B,
                Arrays.asList(TestClassDThreeMethodsWithNoDepsSample.class,
                        TestClassAFiveMethodsWithMethodOnMethodDependenciesSample.class,
                        TestClassASixMethodsWithMethodOnMethodDependenciesSample.class,
                        TestClassASevenMethodsWithMethodOnMethodDependenciesSample.class),
                1);
        verifySameInstancesOfTestClassesAssociatedWithMethods(
                SUITE_A,
                SUITE_A_TEST_B,
                Arrays.asList(TestClassDThreeMethodsWithNoDepsSample.class,
                        TestClassAFiveMethodsWithMethodOnMethodDependenciesSample.class,
                        TestClassASixMethodsWithMethodOnMethodDependenciesSample.class,
                        TestClassASevenMethodsWithMethodOnMethodDependenciesSample.class)
        );
        verifyNumberOfInstancesOfTestClassesForMethods(
                SUITE_B,
                SUITE_B_TEST_A,
                Arrays.asList(
                        TestClassAFiveMethodsWithIntraClassGroupDepsSample.class,
                        TestClassAFiveMethodsWithInterClassGroupDepsSample.class,
                        TestClassGThreeMethodsWithNoDepsSample.class
                ),
                1
        );
        verifySameInstancesOfTestClassesAssociatedWithMethods(
                SUITE_B,
                SUITE_B_TEST_A,
                Arrays.asList(
                        TestClassAFiveMethodsWithIntraClassGroupDepsSample.class,
                        TestClassAFiveMethodsWithInterClassGroupDepsSample.class,
                        TestClassGThreeMethodsWithNoDepsSample.class
                )
        );
        verifyNumberOfInstancesOfTestClassesForMethods(
                SUITE_B,
                SUITE_B_TEST_B,
                Arrays.asList(
                        TestClassASevenMethodsWithIntraClassGroupDepsSample.class,
                        TestClassAFourMethodsWithIntraClassGroupDepsSample.class,
                        TestClassAThreeMethodsWithIntraAndInterClassGroupDepsSample.class,
                        TestClassASixMethodsWithIntraClassGroupDepsSample.class
                ),
                1
        );
        verifySameInstancesOfTestClassesAssociatedWithMethods(
                SUITE_B,
                SUITE_B_TEST_B,
                Arrays.asList(
                        TestClassASevenMethodsWithIntraClassGroupDepsSample.class,
                        TestClassAFourMethodsWithIntraClassGroupDepsSample.class,
                        TestClassAThreeMethodsWithIntraAndInterClassGroupDepsSample.class,
                        TestClassASixMethodsWithIntraClassGroupDepsSample.class
                )
        );
    }
@ Test public void verifyOnlyOneInstanceOfTestClassForAllTestMethodsForAllSuites ( ) { verifyNumberOfInstancesOfTestClassesForMethods ( SUITE_A , SUITE_A_TEST_A , Arrays . asList ( TestClassBSixMethodsWithMethodOnMethodDependenciesSample . class , TestClassAThreeMethodsWithMethodOnMethodDependenciesSample . class ) , 1 ) ; verifySameInstancesOfTestClassesAssociatedWithMethods ( SUITE_A , SUITE_A_TEST_A , Arrays . asList ( TestClassBSixMethodsWithMethodOnMethodDependenciesSample . class , TestClassAThreeMethodsWithMethodOnMethodDependenciesSample . class ) ) ; verifyNumberOfInstancesOfTestClassesForMethods ( SUITE_A , SUITE_A_TEST_B , Arrays . asList ( TestClassDThreeMethodsWithNoDepsSample . class , TestClassAFiveMethodsWithMethodOnMethodDependenciesSample . class , TestClassASixMethodsWithMethodOnMethodDependenciesSample . class , TestClassASevenMethodsWithMethodOnMethodDependenciesSample . class ) , 1 ) ; verifySameInstancesOfTestClassesAssociatedWithMethods ( SUITE_A , SUITE_A_TEST_B , Arrays . asList ( TestClassDThreeMethodsWithNoDepsSample . class , TestClassAFiveMethodsWithMethodOnMethodDependenciesSample . class , TestClassASixMethodsWithMethodOnMethodDependenciesSample . class , TestClassASevenMethodsWithMethodOnMethodDependenciesSample . class ) ) ; verifyNumberOfInstancesOfTestClassesForMethods ( SUITE_B , SUITE_B_TEST_A , Arrays . asList ( TestClassAFiveMethodsWithIntraClassGroupDepsSample . class , TestClassAFiveMethodsWithInterClassGroupDepsSample . class , TestClassGThreeMethodsWithNoDepsSample . class ) , 1 ) ; verifySameInstancesOfTestClassesAssociatedWithMethods ( SUITE_B , SUITE_B_TEST_A , Arrays . asList ( TestClassAFiveMethodsWithIntraClassGroupDepsSample . class , TestClassAFiveMethodsWithInterClassGroupDepsSample . class , TestClassGThreeMethodsWithNoDepsSample . class ) ) ; verifyNumberOfInstancesOfTestClassesForMethods ( SUITE_B , SUITE_B_TEST_B , Arrays . asList ( TestClassASevenMethodsWithIntraClassGroupDepsSample . class , TestClassAFourMethodsWithIntraClassGroupDepsSample . class , TestClassAThreeMethodsWithIntraAndInterClassGroupDepsSample . class , TestClassASixMethodsWithIntraClassGroupDepsSample . class ) , 1 ) ; verifySameInstancesOfTestClassesAssociatedWithMethods ( SUITE_B , SUITE_B_TEST_B , Arrays . asList ( TestClassASevenMethodsWithIntraClassGroupDepsSample . class , TestClassAFourMethodsWithIntraClassGroupDepsSample . class , TestClassAThreeMethodsWithIntraAndInterClassGroupDepsSample . class , TestClassASixMethodsWithIntraClassGroupDepsSample . class ) ) ; }
Verify that the same test class instance is associated with each of the test methods from the sample test class
Verify that the same test class instance is associated with each of the test methods from the sample test class