/// <summary> /// Loads all orders from the endpoint /// </summary> public override async Task LoadAllAsync() { OrderService orderService = new OrderService(); List <Orders> orders = await orderService.GetAllOrdersAsync(); Orders.ReplaceWith(orders); ShipperService shipperService = new ShipperService(); List <Shippers> shippers = await shipperService.GetAllShippersAsync(); Shippers.ReplaceWith(shippers); }
public async Task GetAllShippersAsyncTest() { // Arrange ShipperService service; List <Shippers> shippersList; // Act service = new ShipperService(); shippersList = await service.GetAllShippersAsync(); // Assert Assert.IsTrue(shippersList.Count > 0); }
/// <summary> /// Loads all orders from the web API /// </summary> protected override async Task LoadAllAsync() { // Declare service object OrderService orderService = new OrderService(); // Get all orders from the API List <Orders> orders = await orderService.GetAllOrdersAsync(); // Replace collection without destroying it Orders.ReplaceWith(orders); // Declare service object ShipperService shipperService = new ShipperService(); // Get all shippers from the API List <Shippers> shippers = await shipperService.GetAllShippersAsync(); // Replace collection without destroying it Shippers.ReplaceWith(shippers); }