public async Task GetAndCheckAirportMetadata_InvalidIata_InvalidAirportMetadataException() { var client = new AirportMetadataClientMock(new Airport { Iata = "notIata" }); await Assert.ThrowsAsync <InvalidAirportMetadataException>(async() => await client.GetAndCheckAirportMetadata("iata")); }
public async Task GetAndCheckAirportMetadata_NullLocation_AirportLocationNullException() { var client = new AirportMetadataClientMock(new Airport { Iata = "iata" }); await Assert.ThrowsAsync <AirportLocationNullException>(async() => await client.GetAndCheckAirportMetadata("iata")); }
public async Task GetAndCheckAirportMetadata_AirportWithLocation_Airport() { var airport = new Airport { Iata = "iata", Location = new Location() }; var client = new AirportMetadataClientMock(airport); var result = await client.GetAndCheckAirportMetadata("iata"); Assert.Equal(airport, result); }
public async Task GetAndCheckAirportMetadata_EmptyAirport_EmptyAirportMetadataException() { var client = new AirportMetadataClientMock(null); await Assert.ThrowsAsync <EmptyAirportMetadataException>(async() => await client.GetAndCheckAirportMetadata("iata")); }