예제 #1
0
        public async Task IdOfNonexistentCustomer_DeleteCustomerOrder_ReturnNotFound()
        {
            const int customerId = -1;
            const int orderId    = 8;

            var exception = await Assert.ThrowsAsync <ProblemDetailsException>(() =>
                                                                               _customerController.DeleteCustomerOrder(customerId, orderId));

            Assert.Equal(StatusCodes.Status404NotFound, exception.Details.Status);
            Assert.Contains("customer", exception.Details.Title, StringComparison.OrdinalIgnoreCase);
        }