コード例 #1
0
        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);
        }
コード例 #2
0
 public MockAuthenticatedUserProvider(User user)
 {
     this.user = user;
 }