public void Airline_Constructor_Initialises_To_Known_State_And_Properties_Work() { var airline = new Airline(); TestUtilities.TestProperty(airline, r => r.IataCode, null, "Aa"); TestUtilities.TestProperty(airline, r => r.IcaoCode, null, "An"); TestUtilities.TestProperty(airline, r => r.Name, null, "Bb"); }
public void Airline_ToString_Returns_Standardised_Text() { var airline = new Airline(); airline.IataCode = "IATA"; airline.IcaoCode = "ICAO"; airline.Name = "NAME"; Assert.AreEqual("ICAO NAME", airline.ToString()); airline.IcaoCode = null; Assert.AreEqual("IATA NAME", airline.ToString()); airline.IcaoCode = ""; Assert.AreEqual("IATA NAME", airline.ToString()); }