コード例 #1
0
        public async Task GivenShipStationOrdersServiceWithInternalErrors_WhenGetOrdersAsyncCalled_ThenOrdersReturnedWithoutSkippedOrder()
        {
            var totalOrders         = 120;
            var ordersPosWithErrors = new int[] { 17, 50, 67, 119 };
            var serverStub          = PrepareShipStationServerStub(totalOrders, ordersPosWithErrors);
            var service             = new ShipStationService(this._credentials, new ShipStationTimeouts(), serverStub);
            var orders = await service.GetOrdersAsync(DateTime.UtcNow.AddDays(-1), DateTime.UtcNow, CancellationToken.None, getShipmentsAndFulfillments : true);

            orders.Count().Should().Be(totalOrders - ordersPosWithErrors.Length);
        }