@@ -86,7 +86,7 @@ class CsvDataSourceTest extends Specification {
8686 " olmcharacteristic" ,
8787 " cosPhiFixed"
8888 ] as String []
89- 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)}"
89+ 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)}\" "
9090
9191 expect :
9292 dummyCsvSource. buildFieldsToAttributes(validCsvRow, validHeadline) == [
@@ -103,97 +103,6 @@ class CsvDataSourceTest extends Specification {
103103 ]
104104 }
105105
106- def " A CsvDataSource should be able to handle deprecated invalid csvRows correctly" () {
107- expect :
108- dummyCsvSource. oldFieldVals(csvSep, csvRow) as List == resultingArray
109-
110- where :
111- csvSep | csvRow || resultingArray
112- " ," | " 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)}" || [
113- " 4ca90220-74c2-4369-9afa-a18bf068840d" ,
114- " {\" type\" :\" Point\" ,\" coordinates\" :[7.411111,51.492528],\" crs\" :{\" type\" :\" name\" ,\" properties\" :{\" name\" :\" EPSG:4326\" }}}" ,
115- " node_a" ,
116- " 2020-03-25T15:11:31Z[UTC]" ,
117- " 2020-03-24T15:11:31Z[UTC]" ,
118- " 8f9682df-0744-4b58-a122-f0dc730f6510" ,
119- " true" ,
120- " 1" ,
121- " 1.0" ,
122- " Höchstspannung" ,
123- " 380.0" ,
124- " olm:{(0.00,1.00)}" ,
125- " cosPhiP:{(0.0,1.0),(0.9,1.0),(1.2,-0.3)}"
126- ]
127- " ," | " \" 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)}\" " || [
128- " 4ca90220-74c2-4369-9afa-a18bf068840d" ,
129- " {\" type\" :\" Point\" ,\" coordinates\" :[7.411111,51.492528],\" crs\" :{\" type\" :\" name\" ,\" properties\" :{\" name\" :\" EPSG:4326\" }}}" ,
130- " node_a" ,
131- " 2020-03-25T15:11:31Z[UTC]" ,
132- " 2020-03-24T15:11:31Z[UTC]" ,
133- " 8f9682df-0744-4b58-a122-f0dc730f6510" ,
134- " true" ,
135- " 1" ,
136- " 1.0" ,
137- " Höchstspannung" ,
138- " 380.0" ,
139- " olm:{(0.00,1.00)}" ,
140- " cosPhiP:{(0.0,1.0),(0.9,1.0),(1.2,-0.3)}"
141- ]
142- " ;" | " 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)}" || [
143- " 4ca90220-74c2-4369-9afa-a18bf068840d" ,
144- " cosPhiP:{(0.0,1.0),(0.9,1.0),(1.2,-0.3)}" ,
145- " {(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\" }}}" ,
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\" ;\" {\" 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- " {\" type\" :\" Point\" ,\" coordinates\" :[7.411111,51.492528],\" crs\" :{\" type\" :\" name\" ,\" properties\" :{\" name\" :\" EPSG:4326\" }}}" ,
161- " node_a" ,
162- " 2020-03-25T15:11:31Z[UTC]" ,
163- " 2020-03-24T15:11:31Z[UTC]" ,
164- " 8f9682df-0744-4b58-a122-f0dc730f6510" ,
165- " true" ,
166- " 1" ,
167- " 1.0" ,
168- " Höchstspannung" ,
169- " 380.0" ,
170- " olm:{(0.00,1.00)}" ,
171- " cosPhiP:{(0.0,1.0),(0.9,1.0),(1.2,-0.3)}"
172- ]
173- " ," | " 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\" }}}\" " || [
174- " 66275bfd-978b-4974-9f73-f270165a6351" ,
175- " Standard" ,
176- " f18a5a9b-6d45-4843-be12-be6d12de0e6b" ,
177- " {\" type\" :\" LineString\" ,\" coordinates\" :[[7.4116482,51.4843281],[7.4116482,51.4843281]],\" crs\" :{\" type\" :\" name\" ,\" properties\" :{\" name\" :\" EPSG:4326\" }}}" ,
178- " {\" type\" :\" Point\" ,\" coordinates\" :[0.25423729,0.75409836],\" crs\" :{\" type\" :\" name\" ,\" properties\" :{\" name\" :\" EPSG:0\" }}}"
179- ]
180- " ," | " 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)}\" " || [
181- " 4ca90220-74c2-4369-9afa-a18bf068840d" ,
182- " {\" type\" :\" Point\" ,\" coordinates\" :[7.411111,51.492528],\" crs\" :{\" type\" :\" name\" ,\" properties\" :{\" name\" :\" EPSG:4326\" }}}" ,
183- " node_a" ,
184- " 2020-03-25T15:11:31Z[UTC]" ,
185- " 2020-03-24T15:11:31Z[UTC]" ,
186- " 8f9682df-0744-4b58-a122-f0dc730f6510" ,
187- " true" ,
188- " 1" ,
189- " 1.0" ,
190- " Höchstspannung" ,
191- " 380.0" ,
192- " olm:{(0.00,1.00)}" ,
193- " cosPhiP:{(0.0,1.0),(0.9,1.0),(1.2,-0.3)}"
194- ]
195- }
196-
197106 def " A CsvDataSource should be able to handle a variety of different csvRows correctly" () {
198107 expect :
199108 dummyCsvSource. parseCsvRow(csvRow, csvSep) as List == resultingArray
0 commit comments