01: package test.uniquesuite;
02:
03: import org.testng.Assert;
04: import org.testng.TestNG;
05: import org.testng.annotations.AfterTest;
06: import org.testng.annotations.Test;
07:
08: import testhelper.OutputDirectoryPatch;
09:
10: public class TestAfter {
11:
12: @Test
13: public void testAfter() {
14: TestNG tng = new TestNG();
15: tng.setOutputDirectory(OutputDirectoryPatch
16: .getOutputDirectory());
17: tng.setTestClasses(new Class[] { TestAfter1.class,
18: TestAfter2.class });
19: tng.setVerbose(0);
20: tng.run();
21: Assert.assertEquals(BaseAfter.m_afterCount, 1);
22: }
23:
24: @AfterTest
25: public void afterTest() {
26: BaseAfter.m_afterCount = 0;
27: BaseBefore.m_beforeCount = 0;
28: BaseBefore.m_afterCount = 0;
29: }
30: }
31:
32: /////
|