コード例 #1
0
        public void ItemNotFound()
        {
            // insert wrong guid to catch error
            var editResponse   = _service.Edit(Guid.NewGuid(), this.Input);
            var deleteResponse = _service.Delete(Guid.NewGuid());

            Assert.AreEqual(404, editResponse.StatusCode);
            Assert.AreEqual(404, deleteResponse.StatusCode);
        }
コード例 #2
0
        public IActionResult Delete(Guid id)
        {
            var response = _service.Delete(id);

            return(StatusCode(response.StatusCode, response.Message));
        }