public async void GetCouriers_Empty() { _mockedCourierService.Setup(x => x.ListAsync()).ReturnsAsync(new List <Courier>()); var controllerResponse = await _couriersController.GetAllAsync(); Expect.Empty(controllerResponse); Expect.DeepEqual("[]", controllerResponse); }
public async void GetOrders_Empty() { _mockedOrderService.Setup(x => x.ListAsync()).ReturnsAsync(new List <Order>()); var controllerResponse = await _ordersController.ListAsync(); var okResult = Expect.IsType <OkObjectResult>(controllerResponse); var ordersReturned = Expect.IsType <List <OrderResource> >(okResult.Value); Expect.Empty(ordersReturned); Expect.DeepEqual("[]", ordersReturned); }