01: package test.configuration;
02:
03: import org.testng.Assert;
04: import org.testng.annotations.BeforeGroups;
05: import org.testng.annotations.Test;
06:
07: @Test(groups="foo")
08: public class MultipleBeforeGroupTest {
09: private int m_count = 0;
10:
11: @BeforeGroups("foo")
12: public void beforeGroups() {
13: m_count++;
14: }
15:
16: @Test()
17: public void test() {
18: }
19:
20: @Test(dependsOnMethods="test")
21: public void verify() {
22: Assert.assertEquals(1, m_count);
23: }
24:
25: }
|