1 package test.parameters; 2 3 import org.testng.Assert; 4 import org.testng.annotations.Parameters; 5 import org.testng.annotations.Test; 6 7 @Test 8 public class Override1Sample { 9 10 @Parameters({"InheritedFromSuite", "InheritedFromTest", "InheritedFromClass"}) g(String suite, String test, String cls)11 public void g(String suite, String test, String cls) { 12 Assert.assertEquals(suite, "InheritedFromSuite"); 13 Assert.assertEquals(test, "InheritedFromTest"); 14 Assert.assertEquals(cls, "InheritedFromClass"); 15 } 16 h()17 public void h() { 18 System.out.println("h()"); 19 } 20 21 @Parameters("a") f(String p)22 public void f(String p) { 23 Assert.assertEquals(p, "Correct"); 24 } 25 } 26