public void GetUser_BadIdProvided(int id) { var actual = _userService.GetUser(id); Assert.IsTrue(actual.Result.Failed); Assert.AreEqual(actual.Result.Error.Value, UserValidationMessages.IncorrectId()); Assert.AreEqual(actual.Result.Error.Key, HttpStatusCode.UnprocessableEntity); }
public void DeleteUser_BadIdProvided(int id) { var actual = _userService.DeleteUser(id); Assert.IsTrue(actual.Result.Failed); Assert.AreEqual(actual.Result.Error.Value, UserValidationMessages.IncorrectId()); Assert.AreEqual(actual.Result.Error.Key, HttpStatusCode.BadRequest); }