public async Task GetByDistanceToSunAscending() { long? lastDistance = null; SolarSystemModel solarSystem = await ISolar.GetSolarSystemById(1); IEnumerable <PlanetAndDwarfPlanet> result = await ISolar.GetByDistanceToSunAscending(solarSystem); foreach (PlanetAndDwarfPlanet planet in result) { if (lastDistance == null) { lastDistance = planet.OrbitDistanceInKM; } else { Assert.True(planet.OrbitDistanceInKM >= lastDistance); lastDistance = planet.OrbitDistanceInKM; } } }
public async Task GetSolarSystemById() { var solarSystem = await ISolar.GetSolarSystemById(1); Assert.Equal(1, solarSystem.Id); }