public void PutPoi_ShouldFail_WhenDifferentID() { var controller = new POIsController(new TestCancelaContext()); var badresult = controller.PutPOI(999, GetDemoPOIDTOReceive()); Assert.IsInstanceOfType(badresult, typeof(BadRequestResult)); }
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); }