コード例 #1
0
 public Entities.CurrentWeather ToEntity(CurrentWeatherRequestDto request)
 {
     return(new Entities.CurrentWeather(
                default(long),
                request.CityName,
                CoordinatesMapper.ToEntity(request.Coordinates),
                request.Weather.Select(w => WeatherMapper.ToEntity(w)).ToList(),
                MainMapper.ToEntity(request.Main),
                WindMapper.ToEntity(request.Wind),
                CountryMapper.ToEntity(request.CountryInfo),
                RainMapper.ToEntity(request.Rain)
                ));
 }
コード例 #2
0
 public CurrentWeatherRequestDto ToDto(Entities.CurrentWeather entity)
 {
     return(new CurrentWeatherRequestDto()
     {
         Main = MainMapper.ToDto(entity.Main),
         Weather = entity.Weather.Select(w => WeatherMapper.ToDto(w)).ToList(),
         Wind = WindMapper.ToDto(entity.Wind),
         Rain = RainMapper.ToDto(entity.Rain),
         Coordinates = CoordinatesMapper.ToDto(entity.Coordinates),
         CountryInfo = CountryMapper.ToDto(entity.CountryInfo),
         CityName = entity.CityName
     });
 }
コード例 #3
0
        public void Setup()
        {
            _boardInitializerDouble        = A.Fake <BoardInitializer>();
            _consoleWrapperDouble          = A.Fake <ConsoleWrapper>();
            _boardPrinterDouble            = A.Fake <BoardPrinter>();
            _consoleCoordinateReaderDouble = A.Fake <ConsoleCoordinatesReader>();
            _inputMapperDouble             = A.Fake <CoordinatesMapper>();
            _shotResultMapperDouble        = A.Fake <ShotResultMapper>();

            _subject = new ConsoleGame(
                _boardInitializerDouble,
                _consoleWrapperDouble,
                _boardPrinterDouble,
                _consoleCoordinateReaderDouble,
                _inputMapperDouble,
                _shotResultMapperDouble);
        }
コード例 #4
0
 public void SetUp()
 {
     _subject = new CoordinatesMapper();
 }