@@ -33,11 +33,6 @@ class CsvDataSourceTest extends Specification implements CsvTestDataMeta {
3333 String csvRow , String csvSep ) {
3434 return super . parseCsvRow(csvRow, csvSep)
3535 }
36-
37- String [] oldFieldVals (
38- String csvSep , String csvRow ) {
39- return super . oldFieldVals(csvSep, csvRow)
40- }
4136 }
4237
4338 @Shared
@@ -102,7 +97,7 @@ class CsvDataSourceTest extends Specification implements CsvTestDataMeta {
10297 " olmcharacteristic" ,
10398 " cosPhiFixed"
10499 ] as String []
105- def validCsvRow = " 5ebd8f7e-dedb-4017-bb86-6373c4b68eb8,25.0,100.0,0.95,98.0,test_bmTypeInput,50.0,25.0,olm:{(0.0,1.0)}, cosPhiFixed:{(0.0,1.0)}"
100+ def validCsvRow = " 5ebd8f7e-dedb-4017-bb86-6373c4b68eb8,25.0,100.0,0.95,98.0,test_bmTypeInput,50.0,25.0,\" olm:{(0.0,1.0)}\" , \" cosPhiFixed:{(0.0,1.0)}\" "
106101
107102 expect :
108103 dummyCsvSource. buildFieldsToAttributes(validCsvRow, validHeadline) == [
@@ -119,97 +114,6 @@ class CsvDataSourceTest extends Specification implements CsvTestDataMeta {
119114 ]
120115 }
121116
122- def " A CsvDataSource should be able to handle deprecated invalid csvRows correctly" () {
123- expect :
124- dummyCsvSource. oldFieldVals(csvSep, csvRow) as List == resultingArray
125-
126- where :
127- csvSep | csvRow || resultingArray
128- " ," | " 4ca90220-74c2-4369-9afa-a18bf068840d,{\" type\" :\" Point\" ,\" coordinates\" :[7.411111,51.492528],\" crs\" :{\" type\" :\" name\" ,\" properties\" :{\" name\" :\" EPSG:4326\" }}},node_a,2020-03-25T15:11:31Z[UTC],2020-03-24T15:11:31Z[UTC],8f9682df-0744-4b58-a122-f0dc730f6510,true,1,1.0,Höchstspannung,380.0,olm:{(0.00,1.00)},cosPhiP:{(0.0,1.0),(0.9,1.0),(1.2,-0.3)}" || [
129- " 4ca90220-74c2-4369-9afa-a18bf068840d" ,
130- " {\" type\" :\" Point\" ,\" coordinates\" :[7.411111,51.492528],\" crs\" :{\" type\" :\" name\" ,\" properties\" :{\" name\" :\" EPSG:4326\" }}}" ,
131- " node_a" ,
132- " 2020-03-25T15:11:31Z[UTC]" ,
133- " 2020-03-24T15:11:31Z[UTC]" ,
134- " 8f9682df-0744-4b58-a122-f0dc730f6510" ,
135- " true" ,
136- " 1" ,
137- " 1.0" ,
138- " Höchstspannung" ,
139- " 380.0" ,
140- " olm:{(0.00,1.00)}" ,
141- " cosPhiP:{(0.0,1.0),(0.9,1.0),(1.2,-0.3)}"
142- ]
143- " ," | " \" 4ca90220-74c2-4369-9afa-a18bf068840d\" ,\" {\" type\" :\" Point\" ,\" coordinates\" :[7.411111,51.492528],\" crs\" :{\" type\" :\" name\" ,\" properties\" :{\" name\" :\" EPSG:4326\" }}}\" ,\" node_a\" ,\" 2020-03-25T15:11:31Z[UTC]\" ,\" 2020-03-24T15:11:31Z[UTC]\" ,\" 8f9682df-0744-4b58-a122-f0dc730f6510\" ,\" true\" ,\" 1\" ,\" 1.0\" ,\" Höchstspannung\" ,\" 380.0\" ,\" olm:{(0.00,1.00)}\" ,\" cosPhiP:{(0.0,1.0),(0.9,1.0),(1.2,-0.3)}\" " || [
144- " 4ca90220-74c2-4369-9afa-a18bf068840d" ,
145- " {\" type\" :\" Point\" ,\" coordinates\" :[7.411111,51.492528],\" crs\" :{\" type\" :\" name\" ,\" properties\" :{\" name\" :\" EPSG:4326\" }}}" ,
146- " node_a" ,
147- " 2020-03-25T15:11:31Z[UTC]" ,
148- " 2020-03-24T15:11:31Z[UTC]" ,
149- " 8f9682df-0744-4b58-a122-f0dc730f6510" ,
150- " true" ,
151- " 1" ,
152- " 1.0" ,
153- " Höchstspannung" ,
154- " 380.0" ,
155- " olm:{(0.00,1.00)}" ,
156- " cosPhiP:{(0.0,1.0),(0.9,1.0),(1.2,-0.3)}"
157- ]
158- " ;" | " 4ca90220-74c2-4369-9afa-a18bf068840d;cosPhiP:{(0.0,1.0),(0.9,1.0),(1.2,-0.3)};{\" type\" :\" Point\" ,\" coordinates\" :[7.411111,51.492528],\" crs\" :{\" type\" :\" name\" ,\" properties\" :{\" name\" :\" EPSG:4326\" }}};node_a;2020-03-25T15:11:31Z[UTC];2020-03-24T15:11:31Z[UTC];8f9682df-0744-4b58-a122-f0dc730f6510;true;1;1.0;Höchstspannung;380.0;olm:{(0.00,1.00)};cosPhiP:{(0.0,1.0),(0.9,1.0),(1.2,-0.3)}" || [
159- " 4ca90220-74c2-4369-9afa-a18bf068840d" ,
160- " cosPhiP:{(0.0,1.0),(0.9,1.0),(1.2,-0.3)}" ,
161- " {(0.0,1.0),(0.9,1.0),(1.2,-0.3)};{\" type\" :\" Point\" ,\" coordinates\" :[7.411111,51.492528],\" crs\" :{\" type\" :\" name\" ,\" properties\" :{\" name\" :\" EPSG:4326\" }}}" ,
162- " node_a" ,
163- " 2020-03-25T15:11:31Z[UTC]" ,
164- " 2020-03-24T15:11:31Z[UTC]" ,
165- " 8f9682df-0744-4b58-a122-f0dc730f6510" ,
166- " true" ,
167- " 1" ,
168- " 1.0" ,
169- " Höchstspannung" ,
170- " 380.0" ,
171- " olm:{(0.00,1.00)}" ,
172- " cosPhiP:{(0.0,1.0),(0.9,1.0),(1.2,-0.3)}"
173- ]
174- " ;" | " \" 4ca90220-74c2-4369-9afa-a18bf068840d\" ;\" {\" type\" :\" Point\" ,\" coordinates\" :[7.411111,51.492528],\" crs\" :{\" type\" :\" name\" ,\" properties\" :{\" name\" :\" EPSG:4326\" }}}\" ;\" node_a\" ;\" 2020-03-25T15:11:31Z[UTC]\" ;\" 2020-03-24T15:11:31Z[UTC]\" ;\" 8f9682df-0744-4b58-a122-f0dc730f6510\" ;\" true\" ;\" 1\" ;\" 1.0\" ;\" Höchstspannung\" ;\" 380.0\" ;\" olm:{(0.00,1.00)}\" ;\" cosPhiP:{(0.0,1.0),(0.9,1.0),(1.2,-0.3)}\" " || [
175- " 4ca90220-74c2-4369-9afa-a18bf068840d" ,
176- " {\" type\" :\" Point\" ,\" coordinates\" :[7.411111,51.492528],\" crs\" :{\" type\" :\" name\" ,\" properties\" :{\" name\" :\" EPSG:4326\" }}}" ,
177- " node_a" ,
178- " 2020-03-25T15:11:31Z[UTC]" ,
179- " 2020-03-24T15:11:31Z[UTC]" ,
180- " 8f9682df-0744-4b58-a122-f0dc730f6510" ,
181- " true" ,
182- " 1" ,
183- " 1.0" ,
184- " Höchstspannung" ,
185- " 380.0" ,
186- " olm:{(0.00,1.00)}" ,
187- " cosPhiP:{(0.0,1.0),(0.9,1.0),(1.2,-0.3)}"
188- ]
189- " ," | " 66275bfd-978b-4974-9f73-f270165a6351,Standard,f18a5a9b-6d45-4843-be12-be6d12de0e6b,{\" type\" :\" LineString\" ,\" coordinates\" :[[7.4116482,51.4843281],[7.4116482,51.4843281]],\" crs\" :{\" type\" :\" name\" ,\" properties\" :{\" name\" :\" EPSG:4326\" }}},{\" type\" :\" Point\" ,\" coordinates\" :[0.25423729,0.75409836],\" crs\" :{\" type\" :\" name\" ,\" properties\" :{\" name\" :\" EPSG:0\" }}}\" " || [
190- " 66275bfd-978b-4974-9f73-f270165a6351" ,
191- " Standard" ,
192- " f18a5a9b-6d45-4843-be12-be6d12de0e6b" ,
193- " {\" type\" :\" LineString\" ,\" coordinates\" :[[7.4116482,51.4843281],[7.4116482,51.4843281]],\" crs\" :{\" type\" :\" name\" ,\" properties\" :{\" name\" :\" EPSG:4326\" }}}" ,
194- " {\" type\" :\" Point\" ,\" coordinates\" :[0.25423729,0.75409836],\" crs\" :{\" type\" :\" name\" ,\" properties\" :{\" name\" :\" EPSG:0\" }}}"
195- ]
196- " ," | " 4ca90220-74c2-4369-9afa-a18bf068840d,{\"\" type\"\" :\"\" Point\"\" ,\"\" coordinates\"\" :[7.411111,51.492528],\"\" crs\"\" :{\"\" type\"\" :\"\" name\"\" ,\"\" properties\"\" :{\"\" name\"\" :\"\" EPSG:4326\"\" }}},node_a,2020-03-25T15:11:31Z[UTC],2020-03-24T15:11:31Z[UTC],8f9682df-0744-4b58-a122-f0dc730f6510,true,1,1.0,Höchstspannung,380.0,\" olm:{(0.00,1.00)}\" ,\" cosPhiP:{(0.0,1.0),(0.9,1.0),(1.2,-0.3)}\" " || [
197- " 4ca90220-74c2-4369-9afa-a18bf068840d" ,
198- " {\" type\" :\" Point\" ,\" coordinates\" :[7.411111,51.492528],\" crs\" :{\" type\" :\" name\" ,\" properties\" :{\" name\" :\" EPSG:4326\" }}}" ,
199- " node_a" ,
200- " 2020-03-25T15:11:31Z[UTC]" ,
201- " 2020-03-24T15:11:31Z[UTC]" ,
202- " 8f9682df-0744-4b58-a122-f0dc730f6510" ,
203- " true" ,
204- " 1" ,
205- " 1.0" ,
206- " Höchstspannung" ,
207- " 380.0" ,
208- " olm:{(0.00,1.00)}" ,
209- " cosPhiP:{(0.0,1.0),(0.9,1.0),(1.2,-0.3)}"
210- ]
211- }
212-
213117 def " A CsvDataSource should be able to handle a variety of different csvRows correctly" () {
214118 expect :
215119 dummyCsvSource. parseCsvRow(csvRow, csvSep) as List == resultingArray
0 commit comments