public async Task ReturnALocation(int Id) { var locationService = new HttpLocationService(_config); var result = await locationService.GetLocationByIdAsync(Id); Assert.IsNotNull(result); Assert.That(result.Id, Is.EqualTo(Id)); TestContext.WriteLine($" {result.Id} - {result.Name} - {result.State}"); }
public async Task ReturnLocations() { var locationService = new HttpLocationService(_config); var result = await locationService.GetLocationsAsync(); Assert.That(result, Is.Not.Null); Assert.IsInstanceOf <IEnumerable <Location> >(result); Assert.That(result.Count(), Is.GreaterThan(0)); var firstLocation = result.FirstOrDefault(); Assert.IsNotNull(firstLocation); Assert.IsInstanceOf <Location>(firstLocation); TestContext.WriteLine($"First {firstLocation.Id} - {firstLocation.Name} - {firstLocation.State}"); }
public void Exists() { var locationService = new HttpLocationService(_config); Assert.IsInstanceOf <HttpLocationService>(locationService); }