views:

40

answers:

2

Related Question

My Question:

In the key of ASP.NET-MVC - Do Database Default Values Break The Spirit of Unit Testing?

+1  A: 

I don't see what a database has to do with unit testing. If you are talking about integration testing that's whole other story but a unit test should never hit a database, so to answer your question: no, database default values do not break the spirit of unit testing.

Darin Dimitrov
A: 

I put default values in the database if it's going to be an integration point between applications. Whenever I do use a default value, I always set that property in the constructor of my entity to the same value. So in this sense, I don't see why it would invalidate unit testing.

Ryan