ASP.NET MVC TDD with LINQ and SQL database

Posted by dean nolan on Stack Overflow See other posts from Stack Overflow or by dean nolan
Published on 2009-01-06T14:12:46Z Indexed on 2010/05/14 12:24 UTC
Read the original article Hit count: 399

Filed under:
|
|
|
|

I am trying to start a new MVC project with tests and I thought the best way to go would have 2 databases. 1 for testing against and 1 for when I run the app and use it (also test really as it's not production yet).

For the test database I was thinking of putting create table scripts and fill data scripts within the test setup method and then deleting all this in the tear down method.

I am going to be using Linq to SQL though and I don't think that will allow me to do this?

Will I have to just go the ADO route if I want to do it this way? Or should I just use a mock object and store data as an array or something?.

Any tips on best practices?

How did Jeff go about doing this for StackOveflow?

© Stack Overflow or respective owner

Related posts about ASP.NET

Related posts about mvc