1 package test.factory.classconf; 2 3 import org.testng.Assert; 4 import org.testng.TestListenerAdapter; 5 import org.testng.TestNG; 6 import org.testng.annotations.Test; 7 8 9 /** 10 * This class/interface 11 */ 12 public class XClassOrderWithFactoryTest { 13 @Test testBeforeAfterClassInvocationsWithFactory()14 public void testBeforeAfterClassInvocationsWithFactory() { 15 TestNG testng= new TestNG(); 16 testng.setTestClasses(new Class[] {XClassOrderWithFactory.class}); 17 TestListenerAdapter tla = new TestListenerAdapter(); 18 testng.addListener(tla); 19 testng.setVerbose(0); 20 testng.run(); 21 Assert.assertEquals(XClassOrderWithFactory.LOG.toString(), XClassOrderWithFactory.EXPECTED_LOG); 22 } 23 } 24