public void SubwayLoaderTest() { SubwayLoader subwayLoader = new SubwayLoader(); using (StreamReader streamReader = new StreamReader(@"TestFiles\ObectvilleSubway.txt")) { Subway subway = subwayLoader.Load(streamReader); Assert.AreEqual(stations.Length, subway.GetStations().Count); Assert.IsTrue(subway.GetStations().SequenceEqual(stations)); CheckLine(subway, "Wirfs-Brock Line", wirfsBrockLine); } }
public void AddStationString() { Subway subway = new Subway(); Assert.AreEqual(0, subway.GetStations().Count); const string stationName = "Charing Cross"; subway.AddStation(stationName); Assert.AreEqual(1, subway.GetStations().Count); Assert.IsTrue(subway.GetStations().Contains(new Station(stationName))); }