I would like to create unit test method using Microsoft Unit testing and this method take its input parameters from different tables inside the same DB .
[TestMethod()]
[DataSource("System.Data.SqlClient", "Data Source=ServerName;Initial Catalog=DBName;Persist Security Info=True;User ID=--;Password=--",
"Table1", DataAccessMethod.Random), TestMethod]
public void MyTestMethod(int parameter1,int parameter2)
{
}
For example, parameter1 from table1 and parameter2 from table 2. Can I do that ?
Also, can I make a condition e.g join 2 tables to retrieve sample test data or you can retrieve parameter2 from table2 filtering by parameter1?
All ideas are welcomed.