package test.template.cases.demo;

import org.testng.Assert;
import org.testng.annotations.DataProvider;
import org.testng.annotations.Test;

import test.template.cases.base.BaseTestCase;

public class TestDataTest extends BaseTestCase {

	@Test(dataProvider = "testdata")
	public void test(String name, String password) {
		//From BaseTestCase.properties
		Assert.assertTrue(name.equals("name1"));
		
		//From TestDataTest.properties, which overwrite the value from BaseTestCase.properties
		Assert.assertTrue(password.equals("pwd2")); 
	}

	@DataProvider(name = "testdata")
	public String[][] data() {
		return new String[][] {
			new String[] { data("test.name"), data("test.password") } 
			};
	}
}

@@ -173,16 +173,25 @@
 es.base.
+NoBrowser
 BaseTest
@@ -233,16 +233,25 @@
 extends 
+NoBrowser
 BaseTest
@@ -258,16 +258,177 @@
 Case %7B%0D%0A
+%09%0D%0A%09@Test%0D%0A%09public void testData() %7B%0D%0A%09%09Assert.assertTrue(data(%22test.name%22).equals(%22name1%22));%0D%0A%09%09Assert.assertTrue(data(%22test.password%22).equals(%22pwd2%22)); %0D%0A%09%7D%0D%0A%09
 %0D%0A%09@Test

Update TestDateTest.java