1 package test.uniquesuite;
2 
3 import org.testng.Assert;
4 import org.testng.TestNG;
5 import org.testng.annotations.AfterTest;
6 import org.testng.annotations.Test;
7 
8 import testhelper.OutputDirectoryPatch;
9 
10 public class TestAfter {
11 
12   @Test
testAfter()13   public void testAfter() {
14     TestNG tng = new TestNG();
15     tng.setOutputDirectory(OutputDirectoryPatch.getOutputDirectory());
16     tng.setTestClasses(new Class[] { TestAfter1.class, TestAfter2.class });
17     tng.setVerbose(0);
18     tng.run();
19     Assert.assertEquals(BaseAfter.m_afterCount, 1);
20   }
21 
22   @AfterTest
afterTest()23   public void afterTest() {
24     BaseAfter.m_afterCount = 0;
25     BaseBefore.m_beforeCount = 0;
26     BaseBefore.m_afterCount = 0;
27   }
28 }
29 
30 /////
31 
32