public void GetAirportInformationByAirportCodeWhenParamIsNullOrEmpty() { string airportCode = string.Empty; AirportControllerHandler airportControllerHandler = new AirportControllerHandler(m_AirportManagerMock); AirportDto actual = airportControllerHandler.GetAirportInformationByAirportCode(airportCode); Assert.AreEqual(null, actual); }
public void GetAirportInformationByAirportCodeWhenParamIsValid() { Init(); string airportCode = "AMS"; AirportDto airportDto = new AirportDto { AirportCode = "AMS", CityOrAirportName = "Amsterdam", Country = "Netherlands", CountryCode = "461", LatitudeDegree = "52", LongitudeDegree = "4" }; m_AirportManagerMock.GetAirportInformationByAirportCode(airportCode).Returns(airportDto); AirportControllerHandler airportControllerHandler = new AirportControllerHandler(m_AirportManagerMock); airportControllerHandler.GetAirportInformationByAirportCode(airportCode).ShouldBeEquivalentTo(airportDto); }