01: package test.configuration;
02:
03: import org.testng.Assert;
04: import org.testng.annotations.BeforeTest;
05: import org.testng.annotations.Parameters;
06: import org.testng.annotations.Test;
07:
08: public class ConfigurationWithParameters {
09: private String m_param;
10:
11: @Parameters({"param"})
12: @BeforeTest
13: public void testInit(String param) {
14: m_param = param;
15: }
16:
17: @Parameters({"param"})
18: @Test
19: public void testMethod(String param) {
20: Assert.assertEquals(m_param, param);
21: }
22:
23: }
|