@@ -29,14 +29,10 @@ class CsvWeatherSourceIconTest extends Specification implements CsvTestDataMeta,
2929 @Shared
3030 IdCoordinateSource coordinateSource
3131
32- @Shared
33- String folderPath
34-
3532 def setupSpec () {
3633 coordinateSource = WeatherTestData . coordinateSource
3734 def weatherFactory = new IconTimeBasedWeatherValueFactory ()
38- folderPath = new File (getClass(). getResource(' /weather/icon' ). toURI()). absolutePath
39- source = new CsvWeatherSource (" ," , folderPath, new EntityPersistenceNamingStrategy (), coordinateSource, weatherFactory)
35+ source = new CsvWeatherSource (" ," , iconWeatherFolderPath, new EntityPersistenceNamingStrategy (), coordinateSource, weatherFactory)
4036 }
4137
4238 def " A CsvWeatherSource can read and correctly parse a single value for a specific date and coordinate" () {
@@ -106,7 +102,7 @@ class CsvWeatherSourceIconTest extends Specification implements CsvTestDataMeta,
106102 def coordinateSource = Mock (IdCoordinateSource )
107103 coordinateSource. getCoordinate(_) >> { args -> args[0 ] == 67775 ? Optional . of(expectedCoordinate) : Optional . empty() }
108104 def weatherFactory = new IconTimeBasedWeatherValueFactory ()
109- def source = new CsvWeatherSource (" ," , folderPath , new EntityPersistenceNamingStrategy (), coordinateSource, weatherFactory)
105+ def source = new CsvWeatherSource (" ," , iconWeatherFolderPath , new EntityPersistenceNamingStrategy (), coordinateSource, weatherFactory)
110106 def fieldToValues = new TreeMap<> (String . CASE_INSENSITIVE_ORDER )
111107 fieldToValues. putAll(
112108 [
@@ -153,7 +149,7 @@ class CsvWeatherSourceIconTest extends Specification implements CsvTestDataMeta,
153149 given :
154150 def coordinateSource = new WeatherTestData.DummyIdCoordinateSource ()
155151 def weatherFactory = new IconTimeBasedWeatherValueFactory ()
156- def source = new CsvWeatherSource (" ," , folderPath , new EntityPersistenceNamingStrategy (), coordinateSource, weatherFactory)
152+ def source = new CsvWeatherSource (" ," , iconWeatherFolderPath , new EntityPersistenceNamingStrategy (), coordinateSource, weatherFactory)
157153 def fieldToValues = [
158154 " datum" : " 2019-08-01 01:00:00" ,
159155 " albRad" : " 13.015240669" ,
@@ -197,7 +193,7 @@ class CsvWeatherSourceIconTest extends Specification implements CsvTestDataMeta,
197193 given :
198194 def coordinateSource = new WeatherTestData.DummyIdCoordinateSource ()
199195 def weatherFactory = new IconTimeBasedWeatherValueFactory ()
200- def source = new CsvWeatherSource (" ," , folderPath , new EntityPersistenceNamingStrategy (), coordinateSource, weatherFactory)
196+ def source = new CsvWeatherSource (" ," , iconWeatherFolderPath , new EntityPersistenceNamingStrategy (), coordinateSource, weatherFactory)
201197 def fieldToValues = [
202198 " datum" : " 2019-08-01 01:00:00" ,
203199 " albRad" : " 13.015240669" ,
@@ -240,7 +236,7 @@ class CsvWeatherSourceIconTest extends Specification implements CsvTestDataMeta,
240236 given :
241237 def coordinateSource = new WeatherTestData.DummyIdCoordinateSource ()
242238 def weatherFactory = new IconTimeBasedWeatherValueFactory ()
243- def source = new CsvWeatherSource (" ," , folderPath , new EntityPersistenceNamingStrategy (), coordinateSource, weatherFactory)
239+ def source = new CsvWeatherSource (" ," , iconWeatherFolderPath , new EntityPersistenceNamingStrategy (), coordinateSource, weatherFactory)
244240 def fieldToValues = [
245241 " datum" : " 2019-08-01 01:00:00" ,
246242 " albrad" : " 13.015240669" ,
0 commit comments