public void TestInitialize()
        {
            try {
                StreamReader testFileReader = new StreamReader(filePath, System.Text.Encoding.Default);
                data = testFileReader.ReadToEnd();
                testFileReader.Close();
            } catch (Exception) {
                //TODO
            }

            deserializer = new JavaScriptSerializer();

            response = deserializer.Deserialize<Response>(data);

            List<Monitor> monitors = response.Data.Monitors;
            Monitor firstMonitor = monitors.First();
            List<Line> lines = firstMonitor.Lines;
            firstLine = lines.First();
            Departures departures = firstLine.Departures;
            List<Departure> departure = departures.Departure;
            Departure firstDeparture = departure.First();
            Departure secondDeparture = departure.ElementAt(1);
            departureTime1 = firstDeparture.DepartureTime;
            departureTime2 = secondDeparture.DepartureTime;
        }
示例#2
0
 public Departure(DepartureTime depTime)
 {
     DepartureTime = depTime;
 }
 public Departure(DepartureTime depTime)
 {
     DepartureTime = depTime;
 }