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