示例#1
0
        public async Task GetHomework_BadRequest()
        {
            var response = await HomeworkController.Get(null);

            var code = (StatusCodeResult)response.Result;

            Assert.AreEqual((int)HttpStatusCode.BadRequest, code.StatusCode);
        }
示例#2
0
        public async Task GetHomework_ValidCall()
        {
            var response = await HomeworkController.Get(1);

            var code = ((ObjectResult)response.Result).StatusCode;

            Assert.AreEqual((int)HttpStatusCode.OK, code);
        }