Exemple #1
0
        public void VerifyGetFullStationInfoWorks()
        {
            var stations = NSApi.GetFullStationInformationByName(
                "Delft",
                new List <string> {
                "Dordrecht", "Vlissingen"
            });

            Assert.IsNotEmpty(stations);

            var firstStation = stations.First();

            Assert.IsNotNull(firstStation.Departures);
            Assert.IsNotNull(firstStation.Disruptions);

            Assert.Throws <ArgumentNullException>(() => NSApi.GetFullStationInformationByName(string.Empty));

            var stations2 = NSApi.GetFullStationInformationByName(
                "Delft", null);

            Assert.IsNotEmpty(stations2);

            var firstStation2 = stations.First();

            Assert.IsNotNull(firstStation2.Departures);
            Assert.IsNotNull(firstStation2.Disruptions);
        }
Exemple #2
0
        public void VerifyGetDepartureTimesWorks()
        {
            var times = NSApi.GetDepartureTimes("Delft");

            Assert.IsNotEmpty(times);

            Assert.Throws <ArgumentNullException>(() => NSApi.GetDepartureTimes(string.Empty));
        }
Exemple #3
0
        public void VerifyGetStationsWorks()
        {
            var stations = NSApi.GetStations();

            Assert.IsNotEmpty(stations);

            Assert.AreEqual(622, stations.Count);
        }
Exemple #4
0
        public void VerifyGetDepartureTimesByDestinationWorks()
        {
            var times = NSApi.GetDepartureTimesByDestination("Delft", new List <string> {
                "Dordrecht", "Vlissingen"
            });

            Assert.IsNotEmpty(times);

            Assert.Throws <ArgumentNullException>(() => NSApi.GetDepartureTimesByDestination(string.Empty, null));
        }
Exemple #5
0
        public void VerifyGetDisruptionsWorks()
        {
            var times = NSApi.GetDisruptions("amsterdam");

            Assert.IsNotNull(times);
            Assert.IsNotNull(times.Planned);
            Assert.IsNotNull(times.Unplanned);

            Assert.Throws <ArgumentNullException>(() => NSApi.GetDisruptions(string.Empty));
        }
Exemple #6
0
        public void VerifyGetStationsByNameWorks()
        {
            var stations = NSApi.GetStationsByName("Delft");

            Assert.IsNotEmpty(stations);

            Assert.AreEqual(3, stations.Count);

            Assert.Throws <ArgumentNullException>(() => NSApi.GetStationsByName(string.Empty));
        }