Пример #1
0
        public void ProfileController_Edit_Model_is_not_null()
        {
            // Arrange
            ProfileController controller = new ProfileController(fakeUserRepo);

            // Act
            ViewResult result = controller.Edit(UserID) as ViewResult;

            // Assert
            Assert.That((result.Model as User), Is.Not.Null);
        }
Пример #2
0
        public void ProfileControllerIndexReturnEqualIDToUsername()
        {
            // Arrange

            ProfileController controller = new ProfileController(fakeUserRepo);

            // Act
            ViewResult result = controller.Index("TestUser1") as ViewResult;

            // Assert
            Assert.That((result.Model as User).ID , Is.EqualTo(UserID));
        }