Conexión de prueba de unidad VS 2010 no actualizada

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

1 Respuestas

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.

Respondido 04 Jul 12, 09:07

No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas or haz tu propia pregunta.