1package test.dependent;
2
3import org.testng.Assert;
4import org.testng.TestNG;
5import org.testng.annotations.Test;
6
7import test.SimpleBaseTest;
8
9public class SampleDependentTest extends SimpleBaseTest {
10
11  @Test
12  public void test2() {
13    TestNG tng = create(SD2.class);
14    SD2.m_log.clear();
15    tng.run();
16
17    boolean oneA = false;
18    boolean oneB = false;
19    boolean secondA = false;
20
21    for (String s : SD2.m_log) {
22      if ("oneA".equals(s)) {
23        oneA = true;
24      }
25      if ("oneB".equals(s)) {
26        oneB = true;
27      }
28      if ("secondA".equals(s)) {
29        Assert.assertTrue(oneA);
30        Assert.assertTrue(oneB);
31        secondA = true;
32      }
33      if ("thirdA".equals(s)) {
34        Assert.assertTrue(oneA);
35        Assert.assertTrue(oneB);
36        Assert.assertTrue(secondA);
37      }
38    }
39  }
40}
41