01: package test.factory.classconf;
02:
03: import org.testng.Assert;
04: import org.testng.TestListenerAdapter;
05: import org.testng.TestNG;
06: import org.testng.annotations.BeforeClass;
07: import org.testng.annotations.Test;
08:
09: /**
10: * This class/interface
11: */
12: public class XClassOrderWithFactoryTest {
13: @Test
14: public void testBeforeAfterClassInvocationsWithFactory() {
15: TestNG testng = new TestNG();
16: testng
17: .setTestClasses(new Class[] { XClassOrderWithFactory.class });
18: TestListenerAdapter tla = new TestListenerAdapter();
19: testng.addListener(tla);
20: testng.setVerbose(0);
21: testng.run();
22: Assert.assertEquals(XClassOrderWithFactory.LOG.toString(),
23: XClassOrderWithFactory.EXPECTED_LOG);
24: }
25: }
|