Пример #1
0
        public void PutPoi_ShouldFail_WhenDifferentID()
        {
            var controller = new POIsController(new TestCancelaContext());

            var badresult = controller.PutPOI(999, GetDemoPOIDTOReceive());

            Assert.IsInstanceOfType(badresult, typeof(BadRequestResult));
        }
Пример #2
0
        public void PutPoi_ShouldReturnStatusCode()
        {
            var controller = new POIsController(new TestCancelaContext());

            var item = GetDemoPOIDTOReceive();

            var result = controller.PutPOI(item.PoiID, item) as StatusCodeResult;

            Assert.IsNotNull(result);
            Assert.IsInstanceOfType(result, typeof(StatusCodeResult));
            Assert.AreEqual(HttpStatusCode.NoContent, result.StatusCode);
        }