Esempio n. 1
0
        public async Task ShouldGetAllOrderReturnAddresses()
        {
            var client          = OrderApiClientFactory.Create();
            var returnAddresses = await client.GetOrderReturnAddresses();

            Assert.True(returnAddresses.Count() >= 0);
        }
Esempio n. 2
0
        public async Task ShouldGetAllPendingOrders()
        {
            var client = OrderApiClientFactory.Create();
            var orders = await client.GetAllPendingOrders();

            Assert.True(orders.Count() >= 0);
        }
Esempio n. 3
0
        public async Task ShouldGetAllPackageCarriers()
        {
            var client          = OrderApiClientFactory.Create();
            var packageCarriers = await client.GetPackageCarriers();

            Assert.True(packageCarriers.Count() >= 0);
        }
Esempio n. 4
0
        public async Task ShouldGetAllOrderReturnAddresses()
        {
            var env     = LaunchSettingsProvider.GetEnvironmentalVariables();
            var client  = OrderApiClientFactory.Create();
            var request = new OrderDeliveryNote
            {
                AddressId        = env["CDON_RETURN_ADDRESS_ID"],
                OrderId          = int.Parse(env["GETORDER_ORDERID"]),
                DeliveryNoteRows = new[]
                {
                    new OrderDeliveryNoteRow
                    {
                        ProductId       = "test_sku",
                        ProductName     = "test_name",
                        Quantity        = 1,
                        PickingLocation = "test_picking_location",
                    }
                }
            };
            var stream = await client.GetDeliveryNote(request);

            var base64 = StreamToBase64(stream);

            Assert.True(base64.Length > 30_000);
        }
Esempio n. 5
0
        public async Task ShouldGetOrder()
        {
            var orderId = LaunchSettingsProvider.GetEnvironmentalVariables()["GETORDER_ORDERID"];
            var client  = OrderApiClientFactory.Create();
            var order   = await client.GetOrder(Convert.ToInt32(orderId));

            Assert.NotNull(order);
        }