01: package test.tmp;
02:
03: import org.testng.Reporter;
04: import org.testng.annotations.DataProvider;
05: import org.testng.annotations.Test;
06:
07: public class ParamTest {
08:
09: @Test(dataProvider="dp")
10: public void f(String s, int n) {
11: // if ("Alois".equals(s)) assert false;
12: Reporter.log("CALL " + n);
13: ppp("TEST : " + s);
14: }
15:
16: @DataProvider(name="dp")
17: public Object[][] create() {
18: return new Object[][] { new Object[] { "Cedric", 36 },
19: new Object[] { "Alois", 35 }, };
20: }
21:
22: private void ppp(String string) {
23: System.err.println("[ParamTest] " + string);
24: }
25:
26: }
|