FileDocCategorySizeDatePackage
TestNGStrutsTestCaseTest.javaAPI DocExample2297Mon Jul 23 13:26:26 BST 2007org.apache.struts2

TestNGStrutsTestCaseTest

public class TestNGStrutsTestCaseTest extends TestCase

Fields Summary
Constructors Summary
Methods Summary
public voidtestSimpleTest()

        TestListenerAdapter tla = new TestListenerAdapter();
        TestNG testng = new TestNG();
        testng.setTestClasses(new Class[] { RunTest.class });
        testng.addListener(tla);
        try {
            testng.run();
            assertEquals(1, tla.getPassedTests().size());
            assertEquals(0, tla.getFailedTests().size());
            assertTrue(RunTest.ran);
            assertNotNull(RunTest.mgr);
            assertNotNull(RunTest.du);
            assertNull(Dispatcher.getInstance());
        } finally {
            RunTest.mgr = null;
        }