~ubuntu-branches/ubuntu/utopic/testng/utopic

« back to all changes in this revision

Viewing changes to test/src/test/regression/groupsordering/Base.java

  • Committer: Bazaar Package Importer
  • Author(s): Marcus Better
  • Date: 2009-05-04 10:47:43 UTC
  • Revision ID: james.westby@ubuntu.com-20090504104743-1gbwsis9q1fh3aaj
Tags: upstream-5.9+dfsg
ImportĀ upstreamĀ versionĀ 5.9+dfsg

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
package test.regression.groupsordering;
 
2
 
 
3
 
 
4
import org.testng.Assert;
 
5
import org.testng.annotations.AfterGroups;
 
6
import org.testng.annotations.BeforeGroups;
 
7
import org.testng.annotations.Test;
 
8
 
 
9
public abstract class Base {
 
10
  protected static boolean s_childAWasRun;
 
11
  protected static boolean s_childBWasRun;
 
12
 
 
13
  @BeforeGroups(value= "a", groups= "a")
 
14
  public void setUp() throws Exception {
 
15
//    System.out.println("class is " + getClass().getName() + " Before group  ");
 
16
    Assert.assertFalse(s_childBWasRun || s_childBWasRun, "Static field was not reset: @AfterGroup method not invoked");
 
17
  }
 
18
 
 
19
  @AfterGroups(value= "a", groups= "a")
 
20
  public void tearDown() {
 
21
//    System.out.println("class is " + getClass().getName() + " After group  ");
 
22
    Assert.assertTrue(s_childAWasRun, "Child A was not run");
 
23
    Assert.assertTrue(s_childBWasRun, "Child B was not run");
 
24
    s_childAWasRun= false;
 
25
    s_childBWasRun= false;
 
26
  }
 
27
 
 
28
}