예제 #1
0
        public void UpdateUser_Should_Change_Common_UserData()
        {
            // Arrange
            var repository = new TestUserRepository();
            var user       = repository.GetUser(1);

            //Change the data
            user.UserName = "******";
            user.Password = "******";
            user.Email    = "*****@*****.**";

            //Act
            repository.UpdateUser(user);
            var updatedUser = repository.GetUser(1);

            //Assert
            Assert.IsNotNull(user);
            Assert.AreEqual(user.UserName, "NewUserName");
            Assert.AreEqual(user.Password, "NewPassword");
            Assert.AreEqual(user.Email, "*****@*****.**");
        }