1 package test.objectfactory; 2 3 import org.testng.TestNG; 4 import org.testng.annotations.Test; 5 6 import test.BaseTest; 7 8 public class CombinedTestAndObjectFactoryTest extends BaseTest { 9 @Test combinedTestAndObjectFactory()10 void combinedTestAndObjectFactory() { 11 addClass(CombinedTestAndObjectFactorySample.class.getName()); 12 run(); 13 verifyTests("Should have passed", new String[]{"isConfigured"}, getPassedTests()); 14 verifyTests("Failures", new String[0], getFailedTests()); 15 verifyTests("Skipped", new String[0], getSkippedTests()); 16 } 17 main(String[] args)18 public static void main(String[] args) { 19 TestNG tng = new TestNG(); 20 tng.setTestClasses(new Class[] {CombinedTestAndObjectFactorySample.class}); 21 tng.setVerbose(10); 22 tng.run(); 23 } 24 } 25