• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 package test.parameters;
2 
3 import org.testng.annotations.Test;
4 
5 import test.BaseTest;
6 
7 /**
8  * This class
9  *
10  * @author Cedric Beust, Jul 22, 2004
11  *
12  */
13 public class ParameterTest extends BaseTest {
14 
ppp(String s)15   public static void ppp(String s) {
16     System.out.println("[ParameterTest] " + s);
17   }
18 
19   @Test
stringSingle()20   public void stringSingle() {
21     addClass("test.parameters.ParameterSample");
22     setParameter("first-name", "Cedric");
23     run();
24     String[] passed = {
25       "testSingleString",
26       "testNonExistentParameter",
27     };
28     String[] failed = {
29     };
30     verifyTests("Passed", passed, getPassedTests());
31     verifyTests("Failed", failed, getFailedTests());
32   }
33 
34   @Test
beforeMethodWithParameters()35   public void beforeMethodWithParameters() {
36     addClass("test.parameters.BeforeSampleTest");
37     setParameter("parameter", "parameter value");
38     run();
39     String[] passed = {
40       "testExample",
41     };
42     String[] failed = {
43     };
44     verifyTests("Passed", passed, getPassedTests());
45     verifyTests("Failed", failed, getFailedTests());
46   }
47 
48 }
49