public async Task GetHomework_BadRequest() { var response = await HomeworkController.Get(null); var code = (StatusCodeResult)response.Result; Assert.AreEqual((int)HttpStatusCode.BadRequest, code.StatusCode); }
public async Task GetHomework_ValidCall() { var response = await HomeworkController.Get(1); var code = ((ObjectResult)response.Result).StatusCode; Assert.AreEqual((int)HttpStatusCode.OK, code); }