Пример #1
0
        public async Task DelaysServiceReturnsDelaysResponse()
        {
            var service = new DelaysService(
                A.Fake <ILogger <DelaysService> >(),
                A.Fake <IStationBoardService>(),
                A.Fake <ICrsService>(),
                A.Fake <IConfiguration>(),
                A.Fake <IDateTimeService>());

            var response = await service.GetDelaysAsync(new StationBoardRequest());

            Assert.NotNull(response);
        }
Пример #2
0
        public async Task DelaysServiceReturnsDelaysResponseWithLateTrains()
        {
            var service = new DelaysService(
                A.Fake <ILogger <DelaysService> >(),
                A.Fake <IStationBoardService>(),
                A.Fake <ICrsService>(),
                A.Fake <IConfiguration>(),
                A.Fake <IDateTimeService>());

            var request = new StationBoardRequest
            {
                Crs        = "ABC",
                FilterType = FilterType.to,
                FilterCrs  = "XYZ",
                NumRows    = 5,
            };

            var response = await service.GetDelaysAsync(request);

            Assert.NotNull(response);
        }