Esempio n. 1
0
        public void GetStationByName_IsValidStation_ShouldBeValidStation(string stationName)
        {
            //Arrange
            _stationConfigurationProviderMock.GetStations().Returns(_stationsRepository.Values.ToList());
            IStationService stationService = new StationService(_stationConfigurationProviderMock);
            //Act
            Station station = stationService.GetStationByName(stationName);

            //Assert
            Assert.NotNull(station);
            Assert.True(station.Name == stationName);
        }
Esempio n. 2
0
        public Station GetStationByName(string stationName)
        {
            List <Station> stations = _stationConfigurationProvider.GetStations();

            return(stations.FirstOrDefault(s => s.Name == stationName));
        }