public void Details_Should_Pass_Null_Model_For_Guid_Not_Found() { User loggedInUser = new User() { email = "*****@*****.**", first_name = "john", last_name = "doe", UserID = new Guid() }; IRepository<User> repository = new Repository<User>(new InMemoryUnitOfWork()); repository.Add(loggedInUser); IAuthenticatedUserProvider provider = new MockAuthenticatedUserProvider(loggedInUser); UserController controller = new UserController(repository, provider); ViewResult result = controller.Details(new Guid()); //Assert.IsNull(result.Model); }
public MockAuthenticatedUserProvider(User user) { this.user = user; }