public void DeleteUser() { // Arrange int userCount = _dbMock.Users.Count(); string nickName = "nickName1"; // Act _RESTService.DeleteUser(nickName); var user = _dbMock.Users.FirstOrDefault(i => i.NickName == nickName); // Assert Assert.IsNull(user); Assert.AreEqual(userCount - 1, _dbMock.Users.Count()); }