public void CreateUser() { // Arrange int userCount = _dbMock.Users.Count(); var user = new UserModel { NickName = "nickName3", FullName = "fullName3" }; // Act _RESTService.CreateUser(user); var dbUser = _dbMock.Users.FirstOrDefault(i => i.NickName == user.NickName); // Assert Assert.IsNotNull(dbUser); Assert.AreEqual(user.FullName, dbUser.FullName); Assert.AreEqual(userCount + 1, _dbMock.Users.Count()); }