public void UpdateExistingUser() { // Arrange int userCount = _dbMock.Users.Count(); var user = new UserModel { NickName = "nickName2", FullName = "fullName222" }; // Act _RESTService.UpdateUser(user.NickName, user); var dbUser = _dbMock.Users.FirstOrDefault(i => i.NickName == user.NickName); // Assert Assert.IsNotNull(dbUser); Assert.AreEqual(user.FullName, dbUser.FullName); Assert.AreEqual(userCount, _dbMock.Users.Count()); }