public void GetCustomerOrder() { var customerId = 1; var customerOrders = _service.GetCustomerOrder(customerId); Assert.IsTrue(customerOrders.Count() > 0); }
public async Task <IActionResult> GetOrder([FromRoute] int id) { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } var order = _service.GetCustomerOrder(id); if (order == null) { return(NotFound()); } return(Ok(order)); }