Example #1
0
        public void DeleteContactThatDoesntExistReturnsNotFound()
        {
            var guid       = new Guid("b224a9a9-f02f-4403-ba6c-fb05951ede65");
            var controller = new ContactNumbersController(MockContactNumberService.Object);

            IHttpActionResult response = controller.Delete(guid);

            Assert.IsInstanceOfType(response, typeof(NotFoundResult));
        }
Example #2
0
        public void DeleteReturnsOk()
        {
            var guidOfExistingContactNumber = new Guid("9a005b3e-d9ec-4e08-aefa-589ab5e00bfa");
            var controller = new ContactNumbersController(MockContactNumberService.Object);

            IHttpActionResult response = controller.Delete(guidOfExistingContactNumber);
            var statusCodeResult       = response as StatusCodeResult;

            Assert.IsNotNull(statusCodeResult);
            Assert.AreEqual(statusCodeResult.StatusCode, System.Net.HttpStatusCode.NoContent);
        }