1 package test.factory; 2 3 import org.testng.Assert; 4 import org.testng.TestNG; 5 import org.testng.annotations.Test; 6 7 import test.SimpleBaseTest; 8 9 public class FactoryFailureTest extends SimpleBaseTest { 10 11 @Test factoryThrowingShouldNotRunTests()12 public void factoryThrowingShouldNotRunTests() { 13 TestNG tng = create(FactoryFailureSampleTest.class); 14 15 try { 16 tng.run(); 17 Assert.fail(); 18 } 19 catch(Exception ex) { 20 // success 21 } 22 } 23 } 24