Mercurial > dive4elements > gnv-client
comparison gnv-artifacts/src/test/java/de/intevation/gnv/artifacts/GNVArtifactsTestCase.java @ 243:b599de3db552
Added ODV-Export to VerticalProfiles in InstantaneousPoint
gnv-artifacts/trunk@311 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Tim Englich <tim.englich@intevation.de> |
---|---|
date | Tue, 10 Nov 2009 09:06:35 +0000 |
parents | 5925739d25ac |
children | 9048bc4b17cd |
comparison
equal
deleted
inserted
replaced
242:5925739d25ac | 243:b599de3db552 |
---|---|
478 assertNotNull(artifact); | 478 assertNotNull(artifact); |
479 log.debug("VerticalProfile-Artifact is available"); | 479 log.debug("VerticalProfile-Artifact is available"); |
480 | 480 |
481 CallContext cc = createCallContext(); | 481 CallContext cc = createCallContext(); |
482 Document describeDocument = this.readDocument("src/test/ressources/verticalprofile_instantaneouspoint/verticalprofile_describe.xml"); | 482 Document describeDocument = this.readDocument("src/test/ressources/verticalprofile_instantaneouspoint/verticalprofile_describe.xml"); |
483 // Erster Schritt | 483 |
484 this | 484 int steps = 4; |
485 .doNextStep( | 485 |
486 artifact, | 486 for (int i = 1; i <= steps; i++){ |
487 cc, | 487 this.doNextStep( |
488 "src/test/ressources/verticalprofile_instantaneouspoint/verticalprofile_step_01_feed.xml", | 488 artifact, |
489 "src/test/ressources/verticalprofile_instantaneouspoint/verticalprofile_step_01_advance.xml", describeDocument); | 489 cc, |
490 | 490 "src/test/ressources/verticalprofile_instantaneouspoint/" + |
491 // Zweiter Schritt | 491 "verticalprofile_step_0"+i+"_feed.xml", |
492 this | 492 "src/test/ressources/verticalprofile_instantaneouspoint/" + |
493 .doNextStep( | 493 "verticalprofile_step_0"+i+"_advance.xml", |
494 artifact, | 494 describeDocument); |
495 cc, | 495 } |
496 "src/test/ressources/verticalprofile_instantaneouspoint/verticalprofile_step_02_feed.xml", | |
497 "src/test/ressources/verticalprofile_instantaneouspoint/verticalprofile_step_02_advance.xml", describeDocument); | |
498 | |
499 // Dritter Schritt | |
500 this | |
501 .doNextStep( | |
502 artifact, | |
503 cc, | |
504 "src/test/ressources/verticalprofile_instantaneouspoint/verticalprofile_step_03_feed.xml", | |
505 "src/test/ressources/verticalprofile_instantaneouspoint/verticalprofile_step_03_advance.xml", describeDocument); | |
506 // Vierter Schritt | |
507 this | |
508 .doNextStep( | |
509 artifact, | |
510 cc, | |
511 "src/test/ressources/verticalprofile_instantaneouspoint/verticalprofile_step_04_feed.xml", | |
512 "src/test/ressources/verticalprofile_instantaneouspoint/verticalprofile_step_04_advance.xml", describeDocument); | |
513 | 496 |
514 // Vierter Schritt | 497 // Vierter Schritt |
515 Document outputData = artifact.describe(describeDocument,cc); | 498 Document outputData = artifact.describe(describeDocument,cc); |
516 FileOutputStream fos = null; | 499 FileOutputStream fos = null; |
517 FileOutputStream fos2 = null; | 500 FileOutputStream fos2 = null; |
518 FileOutputStream fos3 = null; | 501 FileOutputStream fos3 = null; |
502 FileOutputStream fos4 = null; | |
519 try { | 503 try { |
520 fos = new FileOutputStream( | 504 fos = new FileOutputStream( |
521 "src/test/results/verticalprofile_instantaneouspoint" | 505 "src/test/results/verticalprofile_instantaneouspoint" |
522 + System.currentTimeMillis() + ".png"); | 506 + System.currentTimeMillis() + ".png"); |
523 fos2 = new FileOutputStream( | 507 fos2 = new FileOutputStream( |
524 "src/test/results/verticalprofile_instantaneouspoint" | 508 "src/test/results/verticalprofile_instantaneouspoint" |
525 + System.currentTimeMillis() + ".xml"); | 509 + System.currentTimeMillis() + ".xml"); |
526 fos3 = new FileOutputStream( | 510 fos3 = new FileOutputStream( |
527 "src/test/results/verticalprofile_instantaneouspoint" | 511 "src/test/results/verticalprofile_instantaneouspoint" |
528 + System.currentTimeMillis() + ".csv"); | 512 + System.currentTimeMillis() + ".csv"); |
529 artifact | 513 fos4 = new FileOutputStream( |
530 .feed( | 514 "src/test/results/verticalprofile_instantaneouspoint" |
531 this | 515 + System.currentTimeMillis() + ".odv"); |
532 .readDocument("src/test/ressources/verticalprofile_instantaneouspoint/verticalprofile_step_05_feed.xml"), | 516 artifact.feed(this.readDocument("src/test/ressources/" + |
533 cc); | 517 "verticalprofile_instantaneouspoint/" + |
534 artifact | 518 "verticalprofile_step_05_feed.xml"), |
535 .out( | 519 cc); |
536 this | 520 artifact.out(this.readDocument("src/test/ressources/" + |
537 .readDocument("src/test/ressources/verticalprofile_instantaneouspoint/verticalprofile_step_05_out_statistics.xml"), | 521 "verticalprofile_instantaneouspoint/" + |
538 fos2, cc); | 522 "verticalprofile_step_05_out_statistics.xml"), |
539 artifact | 523 fos2, cc); |
540 .out( | 524 artifact.out(this.readDocument("src/test/ressources/" + |
541 this | 525 "verticalprofile_instantaneouspoint/" + |
542 .readDocument("src/test/ressources/verticalprofile_instantaneouspoint/verticalprofile_step_05_out_chart.xml"), | 526 "verticalprofile_step_05_out_chart.xml"), |
543 fos, cc); | 527 fos, cc); |
544 artifact | 528 artifact.out(this.readDocument("src/test/ressources/" + |
545 .out( | 529 "verticalprofile_instantaneouspoint/" + |
546 this | 530 "verticalprofile_step_05_out_csv.xml"), |
547 .readDocument("src/test/ressources/verticalprofile_instantaneouspoint/verticalprofile_step_05_out_csv.xml"), | 531 fos3, cc); |
548 fos3, cc); | 532 artifact.out(this.readDocument("src/test/ressources/" + |
533 "verticalprofile_instantaneouspoint/" + | |
534 "verticalprofile_step_05_out_odv.xml"), | |
535 fos4, cc); | |
549 } catch (Exception e) { | 536 } catch (Exception e) { |
550 log.error(e, e); | 537 log.error(e, e); |
551 fail(); | 538 fail(); |
552 } finally { | 539 } finally { |
553 try { | 540 try { |