Example #1
0
        public async Task GetRatesTest()
        {
            IEnumerable <Rate> rates = await DostavItService.GetRatesAsync("Москва", "Саратов", 100, 80, 50, 15, 1500);

            Assert.IsNotNull(rates);
            Assert.IsTrue(rates.Any());
        }
Example #2
0
        public async Task GetCarriersTest()
        {
            IEnumerable <CarrierInfo> carriers = await DostavItService.GetCarriersAsync();

            Assert.IsNotNull(carriers);
            Assert.IsTrue(carriers.Any());
        }
Example #3
0
        public async Task GetCarrierRatesTest()
        {
            IEnumerable <Rate> rates = await DostavItService.GetRatesAsync("DelLin", "Москва", "Саратов", 100, 80, 50, 15, 1500);

            Assert.IsNotNull(rates);
            Assert.IsTrue(rates.Any());
            Assert.IsTrue(rates.All(rate => rate.Carrier.ToLower() == "dellin"));
        }
Example #4
0
        public async Task GetCarrierTest()
        {
            CarrierInfo carrier = await DostavItService.GetCarrierAsync("DelLin");

            Assert.IsNotNull(carrier);
            Assert.IsTrue(!string.IsNullOrEmpty(carrier.Name));
            Assert.IsTrue(!string.IsNullOrEmpty(carrier.FullName));
            Assert.IsTrue(!string.IsNullOrEmpty(carrier.Url));
            Assert.IsTrue(!string.IsNullOrEmpty(carrier.LargeLogoUrl));
            Assert.IsNotNull(carrier.Services);
            Assert.IsTrue(carrier.Services.Any());
        }