01: package test.dataprovider;
02:
03: import org.testng.Assert;
04:
05: public class ChildUsingParentDataProviderTest extends
06: AbstractRootDataProvider {
07: /**
08: * @testng.test dataProvider="test1"
09: */
10: public void useParentDataProvider(String firstName, Integer age) {
11: if (firstName.equals(FN1) && age.equals(LN1)) {
12: m_ok3 = true;
13: }
14: if (firstName.equals(FN2) && age.equals(LN2)) {
15: m_ok4 = true;
16: }
17: }
18:
19: /**
20: * @testng.test dependsOnMethods = "useParentDataProvider"
21: */
22: public void verifyCount() {
23: Assert.assertTrue(m_ok3 && m_ok4);
24: }
25: }
|