I'm new to unit test. Currently developing using Entity Framework Code First. I'm try to use unit test to test each function of my code. But I realize that each test is using an old connection to SQLExpress. How to update the database connection on unit test also what is local.setting do
preguntado el 04 de julio de 12 a las 08:07
Using the words "unit test" and "database connection" in the same sentence is usually wrong. What you are writing are integration tests. You need to separate database connections, so you can use injected stubs or mocks of the database-related operations in the unit tests.