Ejemplo n.º 1
0
 public FrontEndLogic(IWeatherClient weatherClient, ICityDataAccess cityDataAccess, IConsoleWrapper consoleWrapper, int?loops = null)
 {
     _weatherClient  = weatherClient;
     _cityDataAccess = cityDataAccess;
     _consoleWrapper = consoleWrapper;
     _loops          = loops; // Avoid infinite loop for testing purposes. Yuck!
 }
Ejemplo n.º 2
0
        public void Init()
        {
            _weatherClient  = Substitute.For <IWeatherClient>();
            _cityDataAccess = Substitute.For <ICityDataAccess>();
            _consoleWrapper = Substitute.For <IConsoleWrapper>();

            _weatherClient.CitySearch(Arg.Any <string>()).Returns(new List <SearchCityDto>());
            _weatherClient.GetWeather(Arg.Any <string>()).Returns(new CurrentWeatherDto());
            _cityDataAccess.GetAllCities().Returns(new List <SearchCityDto>());
            _consoleWrapper.WriteLine(Arg.Any <string>());
            _consoleWrapper.ReadLine().Returns(string.Empty);

            _sut = new FrontEndLogic(_weatherClient, _cityDataAccess, _consoleWrapper, 1);
        }
Ejemplo n.º 3
0
 public CityCreateService(ICityDataAccess cityDataAccess)
 {
     CityDataAccess = cityDataAccess;
 }
 public CityBusinessAccess(ICityDataAccess cityDataAccess)
 {
     _cityDataAccess = cityDataAccess;
 }
Ejemplo n.º 5
0
 public CityGetService(ICityDataAccess cityDataAccess)
 {
     this.CityDataAccess = cityDataAccess;
 }
Ejemplo n.º 6
0
 public CitySevice(ICityDataAccess storage)
 {
     this.storage = storage;
 }
Ejemplo n.º 7
0
 public CityManager(ICityDataAccess cityDataAccess)
 {
     _cityDataAccess = cityDataAccess;
 }