public void GetAirplaneFromNullArrayReturnsNull() { IHubConnectionService hubConnectionService = new HubConnectionServiceMock(); IWebClientService webClientService = new WebClientMock(null); IRandomDataService randomDataService = new RandomDataServiceMock(); IAirplaneSelectorService airplaneSelectorService = new AirplaneSelectorService(webClientService, hubConnectionService, randomDataService, logger); Airplane airplane = airplaneSelectorService.GetAirplane(); Assert.Null(airplane); }
public void GettingAirplaneReturnsExpectedAirplane() { Airplane[] airplanes = new Airplane[] { new Airplane(), new Airplane(), new Airplane() }; IHubConnectionService hubConnectionService = new HubConnectionServiceMock(); IWebClientService webClientService = new WebClientMock(airplanes); IRandomDataService randomDataService = new RandomDataServiceMock(); IAirplaneSelectorService airplaneSelectorService = new AirplaneSelectorService(webClientService, hubConnectionService, randomDataService, logger); Airplane airplane = airplaneSelectorService.GetAirplane(); Assert.Contains(airplane, airplanes); }