1 package test.parameters;
2 
3 import org.testng.Assert;
4 import org.testng.annotations.Optional;
5 import org.testng.annotations.Parameters;
6 import org.testng.annotations.Test;
7 
8 /**
9  * Checks to see if the parameters from parent suite are passed onto the
10  * child suite (referred by <suite-file>)
11  * @author nullin
12  *
13  */
14 public class InheritFromSuiteChild2
15 {
16    @Test
17    @Parameters({"parameter1", "parameter2", "parameter3", "parameter4"})
inheritedparameter(String p1, String p2, String p3, @Optional("abc")String p4)18    public void inheritedparameter(String p1, String p2, String p3, @Optional("abc")String p4) {
19       Assert.assertEquals(p1, "p1");
20       Assert.assertEquals(p2, "c2p2");
21       Assert.assertEquals(p3, "c2p3");
22       Assert.assertEquals(p4, "abc");
23    }
24 }
25