public void DeleteEmployeeWithInvalidTokenIsNotAllowed() { CreateANumberOfEmployees(3); var ids = _sut.GetActualIds(_client); _sut = new RESTHelper(false); var response = _sut.DeleteEntityById(_client, ids[2]); Assert.That(response.StatusCode, Is.EqualTo(HttpStatusCode.Unauthorized), "Delete Employee with the invalid token was allowed, but should not have been."); }
public void DeleteEmployeeByIdIsPossible() { CreateANumberOfEmployees(3); var ids = _sut.GetActualIds(_client); var response = _sut.DeleteEntityById(_client, ids[2]); var newIds = _sut.GetActualIds(_client); Assert.That(response.StatusCode.ToString(), Is.EqualTo("OK"), "Delete operation did not result in the 'Ok' status code."); Assert.That(newIds, Has.No.Member(response), "Deleted Employee was present in the list of Employee ids, but should not have been."); }