本文整理汇总了Java中org.testng.TestNG.setGroups方法的典型用法代码示例。如果您正苦于以下问题:Java TestNG.setGroups方法的具体用法?Java TestNG.setGroups怎么用?Java TestNG.setGroups使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.testng.TestNG
的用法示例。
在下文中一共展示了TestNG.setGroups方法的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: verifyHappyPath
import org.testng.TestNG; //导入方法依赖的package包/类
@Test
public void verifyHappyPath() {
ListenerChain lc = new ListenerChain();
TestListenerAdapter tla = new TestListenerAdapter();
TestNG testNG = new TestNG();
testNG.setTestClasses(new Class[]{ArtifactCollectorTestCases.class});
testNG.addListener((ITestNGListener) lc);
testNG.addListener((ITestNGListener) tla);
testNG.setGroups("testPassed");
testNG.run();
assertEquals(tla.getPassedTests().size(), 1, "Incorrect passed test count");
assertEquals(tla.getFailedTests().size(), 0, "Incorrect failed test count");
assertEquals(tla.getSkippedTests().size(), 0, "Incorrect skipped test count");
assertEquals(tla.getFailedButWithinSuccessPercentageTests().size(), 0, "Incorrect curve-graded success count");
assertEquals(tla.getConfigurationFailures().size(), 0, "Incorrect configuration method failure count");
assertEquals(tla.getConfigurationSkips().size(), 0, "Incorrect configuration method skip count");
ITestResult result = tla.getPassedTests().get(0);
assertNull(UnitTestArtifact.getCaptureState(result), "Artifact provider capture state should be 'null'");
assertNull(UnitTestCapture.getArtifactPath(result), "Artifact capture should not have been requested");
}
示例2: verifyCaptureOnFailure
import org.testng.TestNG; //导入方法依赖的package包/类
@Test
public void verifyCaptureOnFailure() {
ListenerChain lc = new ListenerChain();
TestListenerAdapter tla = new TestListenerAdapter();
TestNG testNG = new TestNG();
testNG.setTestClasses(new Class[]{ArtifactCollectorTestCases.class});
testNG.addListener((ITestNGListener) lc);
testNG.addListener((ITestNGListener) tla);
testNG.setGroups("testFailed");
testNG.run();
assertEquals(tla.getPassedTests().size(), 0, "Incorrect passed test count");
assertEquals(tla.getFailedTests().size(), 1, "Incorrect failed test count");
assertEquals(tla.getSkippedTests().size(), 0, "Incorrect skipped test count");
assertEquals(tla.getFailedButWithinSuccessPercentageTests().size(), 0, "Incorrect curve-graded success count");
assertEquals(tla.getConfigurationFailures().size(), 0, "Incorrect configuration method failure count");
assertEquals(tla.getConfigurationSkips().size(), 0, "Incorrect configuration method skip count");
ITestResult result = tla.getFailedTests().get(0);
assertEquals(UnitTestArtifact.getCaptureState(result), CaptureState.CAPTURE_SUCCESS, "Incorrect artifact provider capture state");
assertTrue(UnitTestCapture.getArtifactPath(result).isPresent(), "Artifact capture output path is not present");
}
示例3: verifyCanNotCapture
import org.testng.TestNG; //导入方法依赖的package包/类
@Test
public void verifyCanNotCapture() {
ListenerChain lc = new ListenerChain();
TestListenerAdapter tla = new TestListenerAdapter();
TestNG testNG = new TestNG();
testNG.setTestClasses(new Class[]{ArtifactCollectorTestCases.class});
testNG.addListener((ITestNGListener) lc);
testNG.addListener((ITestNGListener) tla);
testNG.setGroups("canNotCapture");
testNG.run();
assertEquals(tla.getPassedTests().size(), 0, "Incorrect passed test count");
assertEquals(tla.getFailedTests().size(), 1, "Incorrect failed test count");
assertEquals(tla.getSkippedTests().size(), 0, "Incorrect skipped test count");
assertEquals(tla.getFailedButWithinSuccessPercentageTests().size(), 0, "Incorrect curve-graded success count");
assertEquals(tla.getConfigurationFailures().size(), 0, "Incorrect configuration method failure count");
assertEquals(tla.getConfigurationSkips().size(), 0, "Incorrect configuration method skip count");
ITestResult result = tla.getFailedTests().get(0);
assertEquals(UnitTestArtifact.getCaptureState(result), CaptureState.CAN_NOT_CAPTURE, "Incorrect artifact provider capture state");
assertFalse(UnitTestCapture.getArtifactPath(result).isPresent(), "Artifact capture output path should not be present");
}
示例4: verifyWillNotCapture
import org.testng.TestNG; //导入方法依赖的package包/类
@Test
public void verifyWillNotCapture() {
ListenerChain lc = new ListenerChain();
TestListenerAdapter tla = new TestListenerAdapter();
TestNG testNG = new TestNG();
testNG.setTestClasses(new Class[]{ArtifactCollectorTestCases.class});
testNG.addListener((ITestNGListener) lc);
testNG.addListener((ITestNGListener) tla);
testNG.setGroups("willNotCapture");
testNG.run();
assertEquals(tla.getPassedTests().size(), 0, "Incorrect passed test count");
assertEquals(tla.getFailedTests().size(), 1, "Incorrect failed test count");
assertEquals(tla.getSkippedTests().size(), 0, "Incorrect skipped test count");
assertEquals(tla.getFailedButWithinSuccessPercentageTests().size(), 0, "Incorrect curve-graded success count");
assertEquals(tla.getConfigurationFailures().size(), 0, "Incorrect configuration method failure count");
assertEquals(tla.getConfigurationSkips().size(), 0, "Incorrect configuration method skip count");
ITestResult result = tla.getFailedTests().get(0);
assertEquals(UnitTestArtifact.getCaptureState(result), CaptureState.CAPTURE_FAILED, "Incorrect artifact provider capture state");
assertFalse(UnitTestCapture.getArtifactPath(result).isPresent(), "Artifact capture output path should not be present");
}
示例5: verifyOnDemandCapture
import org.testng.TestNG; //导入方法依赖的package包/类
@Test
public void verifyOnDemandCapture() {
ListenerChain lc = new ListenerChain();
TestListenerAdapter tla = new TestListenerAdapter();
TestNG testNG = new TestNG();
testNG.setTestClasses(new Class[]{ArtifactCollectorTestCases.class});
testNG.addListener((ITestNGListener) lc);
testNG.addListener((ITestNGListener) tla);
testNG.setGroups("onDemandCapture");
testNG.run();
assertEquals(tla.getPassedTests().size(), 1, "Incorrect passed test count");
assertEquals(tla.getFailedTests().size(), 0, "Incorrect failed test count");
assertEquals(tla.getSkippedTests().size(), 0, "Incorrect skipped test count");
assertEquals(tla.getFailedButWithinSuccessPercentageTests().size(), 0, "Incorrect curve-graded success count");
assertEquals(tla.getConfigurationFailures().size(), 0, "Incorrect configuration method failure count");
assertEquals(tla.getConfigurationSkips().size(), 0, "Incorrect configuration method skip count");
ITestResult result = tla.getPassedTests().get(0);
assertEquals(UnitTestArtifact.getCaptureState(result), CaptureState.CAPTURE_SUCCESS, "Incorrect artifact provider capture state");
assertTrue(UnitTestCapture.getArtifactPath(result).isPresent(), "Artifact capture output path is not present");
}
示例6: runTests
import org.testng.TestNG; //导入方法依赖的package包/类
private void runTests() {
TestNG testNg = new TestNG();
testNg.setOutputDirectory(testReportDir.getAbsolutePath());
testNg.setDefaultSuiteName(options.getDefaultSuiteName());
testNg.setDefaultTestName(options.getDefaultTestName());
testNg.setParallel(options.getParallel());
testNg.setThreadCount(options.getThreadCount());
invokeVerifiedMethod(testNg, "setConfigFailurePolicy", String.class, options.getConfigFailurePolicy(), TestNGOptions.DEFAULT_CONFIG_FAILURE_POLICY);
invokeVerifiedMethod(testNg, "setPreserveOrder", boolean.class, options.getPreserveOrder(), false);
invokeVerifiedMethod(testNg, "setGroupByInstances", boolean.class, options.getGroupByInstances(), false);
testNg.setUseDefaultListeners(options.getUseDefaultListeners());
testNg.setVerbose(0);
testNg.setGroups(CollectionUtils.join(",", options.getIncludeGroups()));
testNg.setExcludedGroups(CollectionUtils.join(",", options.getExcludeGroups()));
//adding custom test listeners before Gradle's listeners.
//this way, custom listeners are more powerful and, for example, they can change test status.
for (String listenerClass : options.getListeners()) {
try {
testNg.addListener(applicationClassLoader.loadClass(listenerClass).newInstance());
} catch (Throwable e) {
throw new GradleException(String.format("Could not add a test listener with class '%s'.", listenerClass), e);
}
}
if (!options.getIncludedTests().isEmpty()) {
testNg.addListener(new SelectedTestsFilter(options.getIncludedTests()));
}
if (!suiteFiles.isEmpty()) {
testNg.setTestSuites(GFileUtils.toPaths(suiteFiles));
} else {
testNg.setTestClasses(testClasses.toArray(new Class[0]));
}
testNg.addListener((Object) adaptListener(new TestNGTestResultProcessorAdapter(resultProcessor, idGenerator, timeProvider)));
testNg.run();
}
示例7: verifyTestFailed
import org.testng.TestNG; //导入方法依赖的package包/类
@Test
public void verifyTestFailed() {
ListenerChain lc = new ListenerChain();
TestListenerAdapter tla = new TestListenerAdapter();
TestNG testNG = new TestNG();
testNG.setTestClasses(new Class[]{ListenerChainTestCases.class});
testNG.addListener((ITestNGListener) lc);
testNG.addListener((ITestNGListener) tla);
testNG.setGroups("testFailed");
testNG.run();
ChainedListener chainedListener = lc.getAttachedListener(ChainedListener.class).get();
assertEquals(tla.getPassedTests().size(), 0, "Incorrect passed test count");
assertEquals(tla.getFailedTests().size(), 1, "Incorrect failed test count");
assertEquals(tla.getSkippedTests().size(), 0, "Incorrect skipped test count");
assertEquals(tla.getFailedButWithinSuccessPercentageTests().size(), 0, "Incorrect curve-graded success count");
assertEquals(tla.getConfigurationFailures().size(), 0, "Incorrect configuration method failure count");
assertEquals(tla.getConfigurationSkips().size(), 0, "Incorrect configuration method skip count");
assertTrue(chainedListener.configSuccess.contains("beforeSuccess"));
assertTrue(chainedListener.configSuccess.contains("afterSuccess"));
assertTrue(chainedListener.beforeConfig.contains("beforeSuccess"));
assertTrue(chainedListener.beforeConfig.contains("afterSuccess"));
assertTrue(chainedListener.beforeMethodBefore.contains("beforeSuccess"));
assertTrue(chainedListener.beforeMethodAfter.contains("beforeSuccess"));
assertTrue(chainedListener.testMethodBefore.contains("testFailed"));
assertTrue(chainedListener.testMethodAfter.contains("testFailed"));
assertTrue(chainedListener.afterMethodBefore.contains("afterSuccess"));
assertTrue(chainedListener.afterMethodAfter.contains("afterSuccess"));
assertTrue(chainedListener.testStarted.contains("testFailed"));
assertTrue(chainedListener.testFailure.contains("testFailed"));
}
示例8: verifyTestSkipped
import org.testng.TestNG; //导入方法依赖的package包/类
@Test
public void verifyTestSkipped() {
ListenerChain lc = new ListenerChain();
TestListenerAdapter tla = new TestListenerAdapter();
TestNG testNG = new TestNG();
testNG.setTestClasses(new Class[]{ListenerChainTestCases.class});
testNG.addListener((ITestNGListener) lc);
testNG.addListener((ITestNGListener) tla);
testNG.setGroups("testSkipped");
testNG.run();
ChainedListener chainedListener = lc.getAttachedListener(ChainedListener.class).get();
assertEquals(tla.getPassedTests().size(), 0, "Incorrect passed test count");
assertEquals(tla.getFailedTests().size(), 0, "Incorrect failed test count");
assertEquals(tla.getSkippedTests().size(), 1, "Incorrect skipped test count");
assertEquals(tla.getFailedButWithinSuccessPercentageTests().size(), 0, "Incorrect curve-graded success count");
assertEquals(tla.getConfigurationFailures().size(), 0, "Incorrect configuration method failure count");
assertEquals(tla.getConfigurationSkips().size(), 0, "Incorrect configuration method skip count");
assertTrue(chainedListener.configSuccess.contains("beforeSuccess"));
assertTrue(chainedListener.configSuccess.contains("afterSuccess"));
assertTrue(chainedListener.beforeConfig.contains("beforeSuccess"));
assertTrue(chainedListener.beforeConfig.contains("afterSuccess"));
assertTrue(chainedListener.beforeMethodBefore.contains("beforeSuccess"));
assertTrue(chainedListener.beforeMethodAfter.contains("beforeSuccess"));
assertTrue(chainedListener.testMethodBefore.contains("testSkipped"));
assertTrue(chainedListener.testMethodAfter.contains("testSkipped"));
assertTrue(chainedListener.afterMethodBefore.contains("afterSuccess"));
assertTrue(chainedListener.afterMethodAfter.contains("afterSuccess"));
assertTrue(chainedListener.testStarted.contains("testSkipped"));
assertTrue(chainedListener.testSkipped.contains("testSkipped"));
}
示例9: verifyFailAndPass
import org.testng.TestNG; //导入方法依赖的package包/类
@Test
public void verifyFailAndPass() {
ListenerChain lc = new ListenerChain();
TestListenerAdapter tla = new TestListenerAdapter();
TestNG testNG = new TestNG();
testNG.setTestClasses(new Class[]{ListenerChainTestCases.class});
testNG.addListener((ITestNGListener) lc);
testNG.addListener((ITestNGListener) tla);
testNG.setGroups("failAndPass");
testNG.run();
ChainedListener chainedListener = lc.getAttachedListener(ChainedListener.class).get();
assertEquals(tla.getPassedTests().size(), 3, "Incorrect passed test count");
assertEquals(tla.getFailedTests().size(), 0, "Incorrect failed test count");
assertEquals(tla.getSkippedTests().size(), 0, "Incorrect skipped test count");
assertEquals(tla.getFailedButWithinSuccessPercentageTests().size(), 1, "Incorrect curve-graded success count");
assertEquals(tla.getConfigurationFailures().size(), 0, "Incorrect configuration method failure count");
assertEquals(tla.getConfigurationSkips().size(), 0, "Incorrect configuration method skip count");
assertTrue(chainedListener.configSuccess.contains("beforeSuccess"));
assertTrue(chainedListener.configSuccess.contains("afterSuccess"));
assertTrue(chainedListener.beforeConfig.contains("beforeSuccess"));
assertTrue(chainedListener.beforeConfig.contains("afterSuccess"));
assertTrue(chainedListener.beforeMethodBefore.contains("beforeSuccess"));
assertTrue(chainedListener.beforeMethodAfter.contains("beforeSuccess"));
assertTrue(chainedListener.testMethodBefore.contains("failAndPass"));
assertTrue(chainedListener.testMethodAfter.contains("failAndPass"));
assertTrue(chainedListener.afterMethodBefore.contains("afterSuccess"));
assertTrue(chainedListener.afterMethodAfter.contains("afterSuccess"));
assertTrue(chainedListener.testStarted.contains("failAndPass"));
assertTrue(chainedListener.testCurved.contains("failAndPass"));
}
示例10: verifyBeforeFailed
import org.testng.TestNG; //导入方法依赖的package包/类
@Test
public void verifyBeforeFailed() {
ListenerChain lc = new ListenerChain();
TestListenerAdapter tla = new TestListenerAdapter();
TestNG testNG = new TestNG();
testNG.setTestClasses(new Class[]{ListenerChainTestCases.class});
testNG.addListener((ITestNGListener) lc);
testNG.addListener((ITestNGListener) tla);
testNG.setGroups("beforeFailed");
testNG.run();
ChainedListener chainedListener = lc.getAttachedListener(ChainedListener.class).get();
assertEquals(tla.getPassedTests().size(), 0, "Incorrect passed test count");
assertEquals(tla.getFailedTests().size(), 0, "Incorrect failed test count");
assertEquals(tla.getSkippedTests().size(), 1, "Incorrect skipped test count");
assertEquals(tla.getFailedButWithinSuccessPercentageTests().size(), 0, "Incorrect curve-graded success count");
assertEquals(tla.getConfigurationFailures().size(), 1, "Incorrect configuration method failure count");
assertEquals(tla.getConfigurationSkips().size(), 1, "Incorrect configuration method skip count");
assertTrue(chainedListener.configFailure.contains("beforeFailure"));
assertTrue(chainedListener.configSkipped.contains("afterSuccess"));
assertTrue(chainedListener.beforeConfig.contains("beforeFailure"));
assertTrue(chainedListener.beforeMethodBefore.contains("beforeFailure"));
assertTrue(chainedListener.beforeMethodAfter.contains("beforeFailure"));
assertTrue(chainedListener.testMethodBefore.contains("skipBeforeFailed"));
assertTrue(chainedListener.testMethodAfter.contains("skipBeforeFailed"));
assertTrue(chainedListener.testStarted.contains("skipBeforeFailed"));
assertTrue(chainedListener.testSkipped.contains("skipBeforeFailed"));
}
示例11: verifyBeforeSkipped
import org.testng.TestNG; //导入方法依赖的package包/类
@Test
public void verifyBeforeSkipped() {
ListenerChain lc = new ListenerChain();
TestListenerAdapter tla = new TestListenerAdapter();
TestNG testNG = new TestNG();
testNG.setTestClasses(new Class[]{ListenerChainTestCases.class});
testNG.addListener((ITestNGListener) lc);
testNG.addListener((ITestNGListener) tla);
testNG.setGroups("beforeSkipped");
testNG.run();
ChainedListener chainedListener = lc.getAttachedListener(ChainedListener.class).get();
assertEquals(tla.getPassedTests().size(), 0, "Incorrect passed test count");
assertEquals(tla.getFailedTests().size(), 0, "Incorrect failed test count");
assertEquals(tla.getSkippedTests().size(), 1, "Incorrect skipped test count");
assertEquals(tla.getFailedButWithinSuccessPercentageTests().size(), 0, "Incorrect curve-graded success count");
assertEquals(tla.getConfigurationFailures().size(), 0, "Incorrect configuration method failure count");
assertEquals(tla.getConfigurationSkips().size(), 2, "Incorrect configuration method skip count");
assertTrue(chainedListener.configSkipped.contains("beforeSkipped"));
assertTrue(chainedListener.configSkipped.contains("afterSuccess"));
assertTrue(chainedListener.beforeConfig.contains("beforeSkipped"));
assertTrue(chainedListener.beforeMethodBefore.contains("beforeSkipped"));
assertTrue(chainedListener.beforeMethodAfter.contains("beforeSkipped"));
assertTrue(chainedListener.testMethodBefore.contains("skipBeforeSkipped"));
assertTrue(chainedListener.testMethodAfter.contains("skipBeforeSkipped"));
assertTrue(chainedListener.testStarted.contains("skipBeforeSkipped"));
assertTrue(chainedListener.testSkipped.contains("skipBeforeSkipped"));
}
示例12: verifyAfterFailed
import org.testng.TestNG; //导入方法依赖的package包/类
@Test
public void verifyAfterFailed() {
ListenerChain lc = new ListenerChain();
TestListenerAdapter tla = new TestListenerAdapter();
TestNG testNG = new TestNG();
testNG.setTestClasses(new Class[]{ListenerChainTestCases.class});
testNG.addListener((ITestNGListener) lc);
testNG.addListener((ITestNGListener) tla);
testNG.setGroups("afterFailed");
testNG.run();
ChainedListener chainedListener = lc.getAttachedListener(ChainedListener.class).get();
assertEquals(tla.getPassedTests().size(), 1, "Incorrect passed test count");
assertEquals(tla.getFailedTests().size(), 0, "Incorrect failed test count");
assertEquals(tla.getSkippedTests().size(), 0, "Incorrect skipped test count");
assertEquals(tla.getFailedButWithinSuccessPercentageTests().size(), 0, "Incorrect curve-graded success count");
assertEquals(tla.getConfigurationFailures().size(), 1, "Incorrect configuration method failure count");
assertEquals(tla.getConfigurationSkips().size(), 0, "Incorrect configuration method skip count");
assertTrue(chainedListener.configSuccess.contains("beforeSuccess"));
assertTrue(chainedListener.configFailure.contains("afterFailure"));
assertTrue(chainedListener.beforeConfig.contains("beforeSuccess"));
assertTrue(chainedListener.beforeConfig.contains("afterFailure"));
assertTrue(chainedListener.beforeMethodBefore.contains("beforeSuccess"));
assertTrue(chainedListener.beforeMethodAfter.contains("beforeSuccess"));
assertTrue(chainedListener.testMethodBefore.contains("testAfterFailed"));
assertTrue(chainedListener.testMethodAfter.contains("testAfterFailed"));
assertTrue(chainedListener.afterMethodBefore.contains("afterFailure"));
assertTrue(chainedListener.afterMethodAfter.contains("afterFailure"));
assertTrue(chainedListener.testStarted.contains("testAfterFailed"));
assertTrue(chainedListener.testSuccess.contains("testAfterFailed"));
}
示例13: verifyAfterSkipped
import org.testng.TestNG; //导入方法依赖的package包/类
@Test
public void verifyAfterSkipped() {
ListenerChain lc = new ListenerChain();
TestListenerAdapter tla = new TestListenerAdapter();
TestNG testNG = new TestNG();
testNG.setTestClasses(new Class[]{ListenerChainTestCases.class});
testNG.addListener((ITestNGListener) lc);
testNG.addListener((ITestNGListener) tla);
testNG.setGroups("afterSkipped");
testNG.run();
ChainedListener chainedListener = lc.getAttachedListener(ChainedListener.class).get();
assertEquals(tla.getPassedTests().size(), 1, "Incorrect passed test count");
assertEquals(tla.getFailedTests().size(), 0, "Incorrect failed test count");
assertEquals(tla.getSkippedTests().size(), 0, "Incorrect skipped test count");
assertEquals(tla.getFailedButWithinSuccessPercentageTests().size(), 0, "Incorrect curve-graded success count");
assertEquals(tla.getConfigurationFailures().size(), 0, "Incorrect configuration method failure count");
assertEquals(tla.getConfigurationSkips().size(), 1, "Incorrect configuration method skip count");
assertTrue(chainedListener.configSuccess.contains("beforeSuccess"));
assertTrue(chainedListener.configSkipped.contains("afterSkipped"));
assertTrue(chainedListener.beforeConfig.contains("beforeSuccess"));
assertTrue(chainedListener.beforeConfig.contains("afterSkipped"));
assertTrue(chainedListener.beforeMethodBefore.contains("beforeSuccess"));
assertTrue(chainedListener.beforeMethodAfter.contains("beforeSuccess"));
assertTrue(chainedListener.testMethodBefore.contains("testAfterSkipped"));
assertTrue(chainedListener.testMethodAfter.contains("testAfterSkipped"));
assertTrue(chainedListener.afterMethodBefore.contains("afterSkipped"));
assertTrue(chainedListener.afterMethodAfter.contains("afterSkipped"));
assertTrue(chainedListener.testStarted.contains("testAfterSkipped"));
assertTrue(chainedListener.testSuccess.contains("testAfterSkipped"));
}
示例14: verifyHappyPath
import org.testng.TestNG; //导入方法依赖的package包/类
@Test
public void verifyHappyPath() {
ListenerChain lc = new ListenerChain();
TestListenerAdapter tla = new TestListenerAdapter();
TestNG testNG = new TestNG();
testNG.setTestClasses(new Class[]{ListenerChainTestCases.class, ListenerChainTestFactory.class});
testNG.addListener((ITestNGListener) lc);
testNG.addListener((ITestNGListener) tla);
testNG.setGroups("happyPath");
testNG.run();
ChainedListener chainedListener = lc.getAttachedListener(ChainedListener.class).get();
assertEquals(tla.getPassedTests().size(), 2, "Incorrect passed test count");
assertEquals(tla.getFailedTests().size(), 0, "Incorrect failed test count");
assertEquals(tla.getSkippedTests().size(), 0, "Incorrect skipped test count");
assertEquals(tla.getFailedButWithinSuccessPercentageTests().size(), 0, "Incorrect curve-graded success count");
assertEquals(tla.getConfigurationFailures().size(), 0, "Incorrect configuration method failure count");
assertEquals(tla.getConfigurationSkips().size(), 0, "Incorrect configuration method skip count");
assertTrue(chainedListener.configSuccess.contains("beforeSuccess"));
assertTrue(chainedListener.configSuccess.contains("afterSuccess"));
assertTrue(chainedListener.beforeConfig.contains("beforeSuccess"));
assertTrue(chainedListener.beforeConfig.contains("afterSuccess"));
assertTrue(chainedListener.beforeMethodBefore.contains("beforeSuccess"));
assertTrue(chainedListener.beforeMethodAfter.contains("beforeSuccess"));
assertTrue(chainedListener.testMethodBefore.contains("happyPath"));
assertTrue(chainedListener.testMethodAfter.contains("happyPath"));
assertTrue(chainedListener.afterMethodBefore.contains("afterSuccess"));
assertTrue(chainedListener.afterMethodAfter.contains("afterSuccess"));
assertTrue(chainedListener.testStarted.contains("happyPath"));
assertTrue(chainedListener.testSuccess.contains("happyPath"));
assertTrue(chainedListener.beforeClass.contains("ListenerChainTestCases"));
assertTrue(chainedListener.afterClass.contains("ListenerChainTestCases"));
assertTrue(chainedListener.testsBegun.contains("Command line test"));
assertTrue(chainedListener.testsEnded.contains("Command line test"));
assertTrue(chainedListener.suiteBegun.contains("Command line suite"));
assertTrue(chainedListener.suiteEnded.contains("Command line suite"));
Set<String> expectTests = new HashSet<>(Arrays.asList("method: testSkipped",
"method: happyPath", "method: beforeSuccess", "method: beforeSkipped",
"method: skipBeforeFailed", "method: skipBeforeSkipped",
"method: testAfterSkipped", "method: productTest", "method: failAndPass",
"method: afterSuccess", "method: afterFailure",
"class: ListenerChainTestCases", "method: testAfterFailed",
"method: beforeFailure", "method: afterSkipped", "method: testFailed",
"method: testAttachedListeners"));
Set<String> expectConfigs = new HashSet<>(Arrays.asList("method: afterSuccess",
"method: afterFailure", "method: beforeSuccess", "method: beforeFailure",
"method: beforeSkipped", "method: afterSkipped"));
assertEquals(chainedListener.xformTest, expectTests);
assertEquals(chainedListener.xformConfig, expectConfigs);
assertTrue(chainedListener.xformProvider.contains("method: dataProvider"));
assertTrue(chainedListener.xformFactory.contains("method: createInstances"));
assertTrue(chainedListener.xformListeners.contains("class: ListenerChainTestCases"));
assertTrue(chainedListener.interceptor.contains("Command line test"));
}