public void TestHotelbedsGetDestinationsAsyncWithNullParameter() { Hotelbeds hotelbeds = new Hotelbeds(Hotelbeds.DEFAULT_KEY, Hotelbeds.DEFAULT_SECRET); var destinations = hotelbeds.GetDestinationsAsync(null).Result; Assert.IsNotNull(destinations); }
public void TestHotelbedsGetDestinationsAsyncWithEmptyParameter() { Hotelbeds hotelbeds = new Hotelbeds(Hotelbeds.DEFAULT_KEY, Hotelbeds.DEFAULT_SECRET); var destinations = hotelbeds.GetDestinationsAsync(new List <Country>()).Result; Assert.IsNotNull(destinations); Assert.IsTrue(destinations.Length > 0); }
public void TestHotelbedsGetDestinationsAsyncWithOneParameter() { Hotelbeds hotelbeds = new Hotelbeds(Hotelbeds.DEFAULT_KEY, Hotelbeds.DEFAULT_SECRET); Country[] countries = { new Country { Code = "RU", Name = "RUSSIA" } }; var destinations = hotelbeds.GetDestinationsAsync(countries).Result; Assert.IsNotNull(destinations); var spb = destinations.First(c => c.Code == "LED"); Assert.IsNotNull(spb); Assert.IsTrue(spb.Name.Contains("Petersburg")); }