public void GetAllStations_NoStations_ReturnsEmptyList() { UnitTestStationInformationLoader loader = new UnitTestStationInformationLoader(); Stations stations = new Stations(loader); Assert.IsType <List <Station> >(stations.GetAllStations()); Assert.Empty(stations.GetAllStations()); }
public void GetAllStations_ReturnOnlyThoseInUse_OneStationInUse_TwoStationsNotInUse_ReturnsOneStation() { UnitTestStationInformationLoader loader = new UnitTestStationInformationLoader(); loader.AddStations( new Station() { Abbreviation = "STS", IsInUse = false }, new Station() { Abbreviation = "SAN", IsInUse = true }, new Station() { Abbreviation = "HAR", IsInUse = false }); Stations stations = new Stations(loader); var result = stations.GetAllStations(); Assert.IsType <List <Station> >(result); Assert.Single(result); }
public void GetAllStations_DontReturnOnlyThoseInUse_OneStationNotInUse_ReturnsEmptyList() { UnitTestStationInformationLoader loader = new UnitTestStationInformationLoader(); loader.AddStations(new Station() { Abbreviation = "STS", IsInUse = false }); Stations stations = new Stations(loader); var result = stations.GetAllStations(returnOnlyStationsInUse: false); Assert.IsType <List <Station> >(result); Assert.Single(result); }
public void GetAllStations_OneStation_ReturnsListWithOneItem() { UnitTestStationInformationLoader loader = new UnitTestStationInformationLoader(); loader.AddStations(new Station() { Abbreviation = "STS", IsInUse = true }); Stations stations = new Stations(loader); var result = stations.GetAllStations(); Assert.IsType <List <Station> >(result); Assert.Single(result); }
public List <Stations> GetAllStation(String line) { return(station.GetAllStations(line)); }