• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 package test.groupinvocation;
2 
3 import org.testng.Assert;
4 import org.testng.annotations.AfterClass;
5 import org.testng.annotations.Test;
6 
7 
8 /**
9  * This class/interface
10  */
11 public class DummyTest2 {
12   private boolean m_invoked= false;
13 
14   @Test(groups={"A"})
dummyTest()15   public void dummyTest() {
16     m_invoked= true;
17   }
18 
19   @AfterClass(alwaysRun=true)
checkInvocations()20   public void checkInvocations() {
21     Assert.assertFalse(m_invoked, "@Test method invoked even if @BeforeGroups failed");
22   }
23 }
24