public async Task GetRatesTest() { IEnumerable <Rate> rates = await DostavItService.GetRatesAsync("Москва", "Саратов", 100, 80, 50, 15, 1500); Assert.IsNotNull(rates); Assert.IsTrue(rates.Any()); }
public async Task GetCarriersTest() { IEnumerable <CarrierInfo> carriers = await DostavItService.GetCarriersAsync(); Assert.IsNotNull(carriers); Assert.IsTrue(carriers.Any()); }
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")); }
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()); }