Home | History | Annotate | Download | only in dependent
      1 package test.dependent;
      2 
      3 import org.testng.Assert;
      4 import org.testng.TestNG;
      5 import org.testng.annotations.Test;
      6 
      7 import test.SimpleBaseTest;
      8 
      9 public 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