Exemplo 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);
        }
Exemplo n.º 2
0
        public Station GetStationByName(string stationName)
        {
            List <Station> stations = _stationConfigurationProvider.GetStations();

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