1 package test.abstractmethods;
2 
3 import org.testng.Assert;
4 import org.testng.TestListenerAdapter;
5 import org.testng.TestNG;
6 import org.testng.annotations.Test;
7 import test.SimpleBaseTest;
8 
9 public class AbstractTest extends SimpleBaseTest {
10 
11   @Test(description = "Abstract methods defined in a superclass should be run")
abstractShouldRun()12   public void abstractShouldRun() {
13     TestNG tng = create(CRUDTest2.class);
14     TestListenerAdapter tla = new TestListenerAdapter();
15     tng.addListener(tla);
16     tng.run();
17 
18     Assert.assertEquals(tla.getPassedTests().size(), 2);
19   }
20 }
21