1 package test.superclass; 2 3 import org.testng.annotations.Test; 4 5 import test.BaseTest; 6 7 public class MainTest extends BaseTest { 8 9 @Test baseMethodIsCalledWithMethodTest()10 public void baseMethodIsCalledWithMethodTest() { 11 addClass("test.superclass.Child1Test"); 12 run(); 13 String[] passed = { 14 "tbase", "t1", "t2", "t3" 15 }; 16 String[] failed = { 17 }; 18 verifyTests("Passed", passed, getPassedTests()); 19 verifyTests("Failed", failed, getFailedTests()); 20 } 21 22 @Test baseMethodIsCalledWithClassTest()23 public void baseMethodIsCalledWithClassTest() { 24 addClass("test.superclass.Child2Test"); 25 run(); 26 String[] passed = { 27 "tbase", "t1", "t2", "t3" 28 }; 29 String[] failed = { 30 }; 31 verifyTests("Passed", passed, getPassedTests()); 32 verifyTests("Failed", failed, getFailedTests()); 33 } 34 35 36 } 37