Unit Testing - Validation of ViewModel ASP.NET MVC 2
- by dean nolan
I am currently unit testing a service that adds users to a repository.
I am using dependency injection to test using a fake repository.
The repository has a method CreateUser(User user) which just adds it to the database or in this case a List of Users.
The logic for the creation is in the UserServices class.
The application has a form for…