public void HttpGet_DeleteMethod_MissingId_ReturnsBadRequest() { var result = controller.Delete(id: null); Assert.That(result, Is.InstanceOf <HttpStatusCodeResult>()); Assert.That(((HttpStatusCodeResult)result).StatusCode, Is.EqualTo((int)HttpStatusCode.BadRequest)); }