comparison gnv-artifacts/src/test/java/de/intevation/gnv/artifacts/GNVArtifactsTestCase.java @ 229:a610c0a01afc

Added the Region-Filter to the Workflow of the Artifacttescases to be able to test it automatically. gnv-artifacts/trunk@297 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Tim Englich <tim.englich@intevation.de>
date Fri, 06 Nov 2009 10:23:55 +0000
parents 3e82b4f1c455
children 3d6d89bcbf42
comparison
equal deleted inserted replaced
228:d53f15c33f89 229:a610c0a01afc
120 .doNextStep( 120 .doNextStep(
121 artifact, 121 artifact,
122 cc, 122 cc,
123 "src/test/ressources/timeseries/timeseries_step_04_feed.xml", 123 "src/test/ressources/timeseries/timeseries_step_04_feed.xml",
124 "src/test/ressources/timeseries/timeseries_step_04_advance.xml", describeDocument); 124 "src/test/ressources/timeseries/timeseries_step_04_advance.xml", describeDocument);
125
126 // Fünfter Schritt
127 this
128 .doNextStep(
129 artifact,
130 cc,
131 "src/test/ressources/timeseries/timeseries_step_05_feed.xml",
132 "src/test/ressources/timeseries/timeseries_step_05_advance.xml", describeDocument);
133
125 134
126 Document outputData; 135 Document outputData;
127 // Fünfter Schritt 136 // Fünfter Schritt
128 outputData = artifact.describe(describeDocument,cc); 137 outputData = artifact.describe(describeDocument,cc);
129 FileOutputStream fos = null; 138 FileOutputStream fos = null;
132 "src/test/results/timeseriesdiagramm" 141 "src/test/results/timeseriesdiagramm"
133 + System.currentTimeMillis() + ".png"); 142 + System.currentTimeMillis() + ".png");
134 artifact 143 artifact
135 .feed( 144 .feed(
136 this 145 this
137 .readDocument("src/test/ressources/timeseries/timeseries_step_05_feed.xml"), 146 .readDocument("src/test/ressources/timeseries/timeseries_step_06_feed.xml"),
138 cc); 147 cc);
139 artifact 148 artifact
140 .out( 149 .out(
141 this 150 this
142 .readDocument("src/test/ressources/timeseries/timeseries_step_05_out.xml"), 151 .readDocument("src/test/ressources/timeseries/timeseries_step_06_out.xml"),
143 fos, cc); 152 fos, cc);
144 } catch (Exception e) { 153 } catch (Exception e) {
145 log.error(e, e); 154 log.error(e, e);
146 fail(); 155 fail();
147 } finally { 156 } finally {
249 .doNextStep( 258 .doNextStep(
250 artifact, 259 artifact,
251 cc, 260 cc,
252 "src/test/ressources/timeseries_mesh/timeseries_step_06_feed.xml", 261 "src/test/ressources/timeseries_mesh/timeseries_step_06_feed.xml",
253 "src/test/ressources/timeseries_mesh/timeseries_step_06_advance.xml", describeDocument); 262 "src/test/ressources/timeseries_mesh/timeseries_step_06_advance.xml", describeDocument);
254 263
255 // Siebter Schritt 264 // Siebter Schritt
265 this
266 .doNextStep(
267 artifact,
268 cc,
269 "src/test/ressources/timeseries_mesh/timeseries_step_07_feed.xml",
270 "src/test/ressources/timeseries_mesh/timeseries_step_07_advance.xml", describeDocument);
271
272 // Achter Schritt
256 Document outputData = artifact.describe(describeDocument,cc); 273 Document outputData = artifact.describe(describeDocument,cc);
257 FileOutputStream fos = null; 274 FileOutputStream fos = null;
258 FileOutputStream fos2 = null; 275 FileOutputStream fos2 = null;
259 FileOutputStream fos3 = null; 276 FileOutputStream fos3 = null;
260 try { 277 try {
268 + System.currentTimeMillis() 285 + System.currentTimeMillis()
269 + ".csv"); 286 + ".csv");
270 artifact 287 artifact
271 .feed( 288 .feed(
272 this 289 this
273 .readDocument("src/test/ressources/timeseries_mesh/timeseries_step_07_feed.xml"), 290 .readDocument("src/test/ressources/timeseries_mesh/timeseries_step_08_feed.xml"),
274 cc); 291 cc);
275 artifact 292 artifact
276 .out( 293 .out(
277 this 294 this
278 .readDocument("src/test/ressources/timeseries_mesh/timeseries_step_07_out_statistics.xml"), 295 .readDocument("src/test/ressources/timeseries_mesh/timeseries_step_08_out_statistics.xml"),
279 fos2, cc); 296 fos2, cc);
280 artifact 297 artifact
281 .out( 298 .out(
282 this 299 this
283 .readDocument("src/test/ressources/timeseries_mesh/timeseries_step_07_out_chart.xml"), 300 .readDocument("src/test/ressources/timeseries_mesh/timeseries_step_08_out_chart.xml"),
284 fos, cc); 301 fos, cc);
285 artifact 302 artifact
286 .out( 303 .out(
287 this 304 this
288 .readDocument("src/test/ressources/timeseries_mesh/timeseries_step_07_out_csv.xml"), 305 .readDocument("src/test/ressources/timeseries_mesh/timeseries_step_08_out_csv.xml"),
289 fos3, cc); 306 fos3, cc);
290 } catch (Exception e) { 307 } catch (Exception e) {
291 log.error(e, e); 308 log.error(e, e);
292 fail(); 309 fail();
293 } finally { 310 } finally {
353 .doNextStep( 370 .doNextStep(
354 artifact, 371 artifact,
355 cc, 372 cc,
356 "src/test/ressources/verticalprofile/verticalprofile_step_04_feed.xml", 373 "src/test/ressources/verticalprofile/verticalprofile_step_04_feed.xml",
357 "src/test/ressources/verticalprofile/verticalprofile_step_04_advance.xml", describeDocument); 374 "src/test/ressources/verticalprofile/verticalprofile_step_04_advance.xml", describeDocument);
375
376 // Fünfter Schritt
377 this
378 .doNextStep(
379 artifact,
380 cc,
381 "src/test/ressources/verticalprofile/verticalprofile_step_05_feed.xml",
382 "src/test/ressources/verticalprofile/verticalprofile_step_05_advance.xml", describeDocument);
358 383
359 384
360 // Vierter Schritt 385 // Vierter Schritt
361 Document outputData = artifact.describe(describeDocument,cc); 386 Document outputData = artifact.describe(describeDocument,cc);
362 FileOutputStream fos = null; 387 FileOutputStream fos = null;
373 + System.currentTimeMillis() 398 + System.currentTimeMillis()
374 + ".csv"); 399 + ".csv");
375 artifact 400 artifact
376 .feed( 401 .feed(
377 this 402 this
378 .readDocument("src/test/ressources/verticalprofile/verticalprofile_step_05_feed.xml"), 403 .readDocument("src/test/ressources/verticalprofile/verticalprofile_step_06_feed.xml"),
379 cc); 404 cc);
380 artifact 405 artifact
381 .out( 406 .out(
382 this 407 this
383 .readDocument("src/test/ressources/verticalprofile/verticalprofile_step_05_out_statistics.xml"), 408 .readDocument("src/test/ressources/verticalprofile/verticalprofile_step_06_out_statistics.xml"),
384 fos2, cc); 409 fos2, cc);
385 artifact 410 artifact
386 .out( 411 .out(
387 this 412 this
388 .readDocument("src/test/ressources/verticalprofile/verticalprofile_step_05_out_chart.xml"), 413 .readDocument("src/test/ressources/verticalprofile/verticalprofile_step_06_out_chart.xml"),
389 fos, cc); 414 fos, cc);
390 artifact 415 artifact
391 .out( 416 .out(
392 this 417 this
393 .readDocument("src/test/ressources/verticalprofile/verticalprofile_step_05_out_csv.xml"), 418 .readDocument("src/test/ressources/verticalprofile/verticalprofile_step_06_out_csv.xml"),
394 fos3, cc); 419 fos3, cc);
395 } catch (Exception e) { 420 } catch (Exception e) {
396 log.error(e, e); 421 log.error(e, e);
397 fail(); 422 fail();
398 } finally { 423 } finally {
481 .doNextStep( 506 .doNextStep(
482 artifact, 507 artifact,
483 cc, 508 cc,
484 "src/test/ressources/verticalprofile_mesh/verticalprofile_step_07_feed.xml", 509 "src/test/ressources/verticalprofile_mesh/verticalprofile_step_07_feed.xml",
485 "src/test/ressources/verticalprofile_mesh/verticalprofile_step_07_advance.xml", describeDocument); 510 "src/test/ressources/verticalprofile_mesh/verticalprofile_step_07_advance.xml", describeDocument);
486 511
487 // Achter Schritt 512 // Achter Schritt
513 this
514 .doNextStep(
515 artifact,
516 cc,
517 "src/test/ressources/verticalprofile_mesh/verticalprofile_step_08_feed.xml",
518 "src/test/ressources/verticalprofile_mesh/verticalprofile_step_08_advance.xml", describeDocument);
519
520
521 // Neunter Schritt
522 this
523 .doNextStep(
524 artifact,
525 cc,
526 "src/test/ressources/verticalprofile_mesh/verticalprofile_step_09_feed.xml",
527 "src/test/ressources/verticalprofile_mesh/verticalprofile_step_09_advance.xml", describeDocument);
528
529
530 // 10. Schritt
488 Document outputData = artifact.describe(describeDocument,cc); 531 Document outputData = artifact.describe(describeDocument,cc);
489 FileOutputStream fos = null; 532 FileOutputStream fos = null;
490 FileOutputStream fos2 = null; 533 FileOutputStream fos2 = null;
491 FileOutputStream fos3 = null; 534 FileOutputStream fos3 = null;
492 try { 535 try {
500 "src/test/results/verticalprofile_mesh" 543 "src/test/results/verticalprofile_mesh"
501 + System.currentTimeMillis() + ".csv"); 544 + System.currentTimeMillis() + ".csv");
502 artifact 545 artifact
503 .feed( 546 .feed(
504 this 547 this
505 .readDocument("src/test/ressources/verticalprofile_mesh/verticalprofile_step_08_feed.xml"), 548 .readDocument("src/test/ressources/verticalprofile_mesh/verticalprofile_step_10_feed.xml"),
506 cc); 549 cc);
507 artifact 550 artifact
508 .out( 551 .out(
509 this 552 this
510 .readDocument("src/test/ressources/verticalprofile_mesh/verticalprofile_step_08_out_statistics.xml"), 553 .readDocument("src/test/ressources/verticalprofile_mesh/verticalprofile_step_10_out_statistics.xml"),
511 fos2, cc); 554 fos2, cc);
512 artifact 555 artifact
513 .out( 556 .out(
514 this 557 this
515 .readDocument("src/test/ressources/verticalprofile_mesh/verticalprofile_step_08_out_chart.xml"), 558 .readDocument("src/test/ressources/verticalprofile_mesh/verticalprofile_step_10_out_chart.xml"),
516 fos, cc); 559 fos, cc);
517 artifact 560 artifact
518 .out( 561 .out(
519 this 562 this
520 .readDocument("src/test/ressources/verticalprofile_mesh/verticalprofile_step_08_out_csv.xml"), 563 .readDocument("src/test/ressources/verticalprofile_mesh/verticalprofile_step_10_out_csv.xml"),
521 fos3, cc); 564 fos3, cc);
522 } catch (Exception e) { 565 } catch (Exception e) {
523 log.error(e, e); 566 log.error(e, e);
524 fail(); 567 fail();
525 } finally { 568 } finally {
818 .doNextStep( 861 .doNextStep(
819 artifact, 862 artifact,
820 cc, 863 cc,
821 "src/test/ressources/horizontalProfile_mesh/horizontalprofile_step_07_feed.xml", 864 "src/test/ressources/horizontalProfile_mesh/horizontalprofile_step_07_feed.xml",
822 "src/test/ressources/horizontalProfile_mesh/horizontalprofile_step_07_advance.xml", describeDocument); 865 "src/test/ressources/horizontalProfile_mesh/horizontalprofile_step_07_advance.xml", describeDocument);
866
867 // Achter Schritt
868 this
869 .doNextStep(
870 artifact,
871 cc,
872 "src/test/ressources/horizontalProfile_mesh/horizontalprofile_step_08_feed.xml",
873 "src/test/ressources/horizontalProfile_mesh/horizontalprofile_step_08_advance.xml", describeDocument);
874
875 // Neunter Schritt
876 this
877 .doNextStep(
878 artifact,
879 cc,
880 "src/test/ressources/horizontalProfile_mesh/horizontalprofile_step_09_feed.xml",
881 "src/test/ressources/horizontalProfile_mesh/horizontalprofile_step_09_advance.xml", describeDocument);
823 882
824 Document outputData = artifact.describe(describeDocument,cc); 883 Document outputData = artifact.describe(describeDocument,cc);
825 FileOutputStream fos = null; 884 FileOutputStream fos = null;
826 FileOutputStream fos2 = null; 885 FileOutputStream fos2 = null;
827 FileOutputStream fos3 = null; 886 FileOutputStream fos3 = null;
836 "src/test/results/horizontalProfile_mesh" 895 "src/test/results/horizontalProfile_mesh"
837 + System.currentTimeMillis() + ".csv"); 896 + System.currentTimeMillis() + ".csv");
838 artifact 897 artifact
839 .feed( 898 .feed(
840 this 899 this
841 .readDocument("src/test/ressources/horizontalProfile_mesh/horizontalprofile_step_08_feed.xml"), 900 .readDocument("src/test/ressources/horizontalProfile_mesh/horizontalprofile_step_10_feed.xml"),
842 cc); 901 cc);
843 artifact 902 artifact
844 .out( 903 .out(
845 this 904 this
846 .readDocument("src/test/ressources/horizontalProfile_mesh/horizontalprofile_step_08_out_statistics.xml"), 905 .readDocument("src/test/ressources/horizontalProfile_mesh/horizontalprofile_step_10_out_statistics.xml"),
847 fos2, cc); 906 fos2, cc);
848 artifact 907 artifact
849 .out( 908 .out(
850 this 909 this
851 .readDocument("src/test/ressources/horizontalProfile_mesh/horizontalprofile_step_08_out_chart.xml"), 910 .readDocument("src/test/ressources/horizontalProfile_mesh/horizontalprofile_step_10_out_chart.xml"),
852 fos, cc); 911 fos, cc);
853 artifact.out(this.readDocument("src/test/ressources/horizontalProfile_mesh/horizontalprofile_step_08_out_csv.xml"), 912 artifact.out(this.readDocument("src/test/ressources/horizontalProfile_mesh/horizontalprofile_step_10_out_csv.xml"),
854 fos3, 913 fos3,
855 cc); 914 cc);
856 } catch (Exception e) { 915 } catch (Exception e) {
857 log.error(e, e); 916 log.error(e, e);
858 fail(); 917 fail();
917 artifact, 976 artifact,
918 cc, 977 cc,
919 "src/test/ressources/horizontalcrosssection_mesh/horizontalcrosssection_step_04_feed.xml", 978 "src/test/ressources/horizontalcrosssection_mesh/horizontalcrosssection_step_04_feed.xml",
920 "src/test/ressources/horizontalcrosssection_mesh/horizontalcrosssection_step_04_advance.xml", describeDocument); 979 "src/test/ressources/horizontalcrosssection_mesh/horizontalcrosssection_step_04_advance.xml", describeDocument);
921 980
981 // Fünfter Schritt
982 this
983 .doNextStep(
984 artifact,
985 cc,
986 "src/test/ressources/horizontalcrosssection_mesh/horizontalcrosssection_step_05_feed.xml",
987 "src/test/ressources/horizontalcrosssection_mesh/horizontalcrosssection_step_05_advance.xml", describeDocument);
988
922 Document outputData = artifact.describe(describeDocument,cc); 989 Document outputData = artifact.describe(describeDocument,cc);
923 FileOutputStream fos = null; 990 FileOutputStream fos = null;
924 FileOutputStream fos2 = null; 991 FileOutputStream fos2 = null;
925 FileOutputStream fos3 = null; 992 FileOutputStream fos3 = null;
926 try { 993 try {
933 fos3 = new FileOutputStream( 1000 fos3 = new FileOutputStream(
934 "src/test/results/horizontalcrosssection_mesh" 1001 "src/test/results/horizontalcrosssection_mesh"
935 + System.currentTimeMillis() + ".csv"); 1002 + System.currentTimeMillis() + ".csv");
936 artifact 1003 artifact
937 .feed(this.readDocument("src/test/ressources/horizontal" + 1004 .feed(this.readDocument("src/test/ressources/horizontal" +
938 "crosssection_mesh/horizontalcrosssection_step_05_feed.xml"), 1005 "crosssection_mesh/horizontalcrosssection_step_06_feed.xml"),
939 cc); 1006 cc);
940 artifact 1007 artifact
941 .out(this.readDocument("src/test/ressources/horizontal" + 1008 .out(this.readDocument("src/test/ressources/horizontal" +
942 "crosssection_mesh/horizontalcrosssection_step_05_out_statistics.xml"), 1009 "crosssection_mesh/horizontalcrosssection_step_06_out_statistics.xml"),
943 fos2, cc); 1010 fos2, cc);
944 artifact 1011 artifact
945 .out(this.readDocument("src/test/ressources/horizontal" + 1012 .out(this.readDocument("src/test/ressources/horizontal" +
946 "crosssection_mesh/horizontalcrosssection_step_05_out_chart.xml"), 1013 "crosssection_mesh/horizontalcrosssection_step_06_out_chart.xml"),
947 fos, cc); 1014 fos, cc);
948 artifact.out(this.readDocument("src/test/ressources/horizontal" + 1015 artifact.out(this.readDocument("src/test/ressources/horizontal" +
949 "crosssection_mesh/horizontalcrosssection_step_05_out_csv.xml"), 1016 "crosssection_mesh/horizontalcrosssection_step_06_out_csv.xml"),
950 fos3, 1017 fos3,
951 cc); 1018 cc);
952 } catch (Exception e) { 1019 } catch (Exception e) {
953 log.error(e, e); 1020 log.error(e, e);
954 fail(); 1021 fail();
1027 .doNextStep( 1094 .doNextStep(
1028 artifact, 1095 artifact,
1029 cc, 1096 cc,
1030 "src/test/ressources/verticalcrosssection_mesh/verticalcrosssection_step_06_feed.xml", 1097 "src/test/ressources/verticalcrosssection_mesh/verticalcrosssection_step_06_feed.xml",
1031 "src/test/ressources/verticalcrosssection_mesh/verticalcrosssection_step_06_advance.xml", describeDocument); 1098 "src/test/ressources/verticalcrosssection_mesh/verticalcrosssection_step_06_advance.xml", describeDocument);
1032 1099 // Siebter Schritt
1100 this
1101 .doNextStep(
1102 artifact,
1103 cc,
1104 "src/test/ressources/verticalcrosssection_mesh/verticalcrosssection_step_07_feed.xml",
1105 "src/test/ressources/verticalcrosssection_mesh/verticalcrosssection_step_07_advance.xml", describeDocument);
1033 1106
1034 Document outputData = artifact.describe(describeDocument,cc); 1107 Document outputData = artifact.describe(describeDocument,cc);
1035 FileOutputStream fos = null; 1108 FileOutputStream fos = null;
1036 FileOutputStream fos2 = null; 1109 FileOutputStream fos2 = null;
1037 FileOutputStream fos3 = null; 1110 FileOutputStream fos3 = null;
1046 "src/test/results/verticalcrosssection_mesh" 1119 "src/test/results/verticalcrosssection_mesh"
1047 + System.currentTimeMillis() + ".csv"); 1120 + System.currentTimeMillis() + ".csv");
1048 artifact 1121 artifact
1049 .feed( 1122 .feed(
1050 this 1123 this
1051 .readDocument("src/test/ressources/verticalcrosssection_mesh/verticalcrosssection_step_07_feed.xml"), 1124 .readDocument("src/test/ressources/verticalcrosssection_mesh/verticalcrosssection_step_08_feed.xml"),
1052 cc); 1125 cc);
1053 artifact 1126 artifact
1054 .out( 1127 .out(
1055 this 1128 this
1056 .readDocument("src/test/ressources/verticalcrosssection_mesh/verticalcrosssection_step_07_out_statistics.xml"), 1129 .readDocument("src/test/ressources/verticalcrosssection_mesh/verticalcrosssection_step_08_out_statistics.xml"),
1057 fos2, cc); 1130 fos2, cc);
1058 artifact 1131 artifact
1059 .out( 1132 .out(
1060 this 1133 this
1061 .readDocument("src/test/ressources/verticalcrosssection_mesh/verticalcrosssection_step_07_out_chart.xml"), 1134 .readDocument("src/test/ressources/verticalcrosssection_mesh/verticalcrosssection_step_08_out_chart.xml"),
1062 fos, cc); 1135 fos, cc);
1063 artifact.out(this.readDocument("src/test/ressources/verticalcrosssection_mesh/verticalcrosssection_step_07_out_csv.xml"), 1136 artifact.out(this.readDocument("src/test/ressources/verticalcrosssection_mesh/verticalcrosssection_step_08_out_csv.xml"),
1064 fos3, 1137 fos3,
1065 cc); 1138 cc);
1066 } catch (Exception e) { 1139 } catch (Exception e) {
1067 log.error(e, e); 1140 log.error(e, e);
1068 fail(); 1141 fail();

http://dive4elements.wald.intevation.org