MS Test DataSource Connection String not working
Utilizing an MS SQL DB to provide data for my unit tests, I have several TestMethods using the following connection string:
WORKS - [DataSource("Persist Security Info=False;User ID=MyUserId; Password=MyPassword;Initial Catalog=UnitTestData;Server=database-server;Provider=SQLOLEDB", "ValidData")]
The above works but requires my user name/password. Windows authentication should be working, as well although I cannot get the connection string below to work:
DOES NOT WORK - [DataSource("Data Source=database-server; Initial Catalog=UnitTestData; Integrated Security=True; Provider=SQLOLEDB", "ValidData")]
I don't want to use SQLOLEDB as the Provider, I want to System.Data.SqlClient but when I try, I get an error that it's not registered.
I know Windows Authentication should work. In the ctor of this TestClass, I created a new SqlConnection instance, using the non-working connection string and I'm abloe to open a connection to the server.
I think an answer may be to provide a correct value in the Provider= section but I'm unsure what it may be.