Mercurial > dive4elements > gnv-client
comparison gnv-artifacts/src/test/java/de/intevation/gnv/artifacts/GNVArtifactsTestCase.java @ 245:9697a6b8d2c9
Added ODV-Export to HorizontalCrossSection on Meshes
gnv-artifacts/trunk@314 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Tim Englich <tim.englich@intevation.de> |
---|---|
date | Tue, 10 Nov 2009 14:10:52 +0000 |
parents | 9048bc4b17cd |
children | b7f69809239c |
comparison
equal
deleted
inserted
replaced
244:9048bc4b17cd | 245:9697a6b8d2c9 |
---|---|
749 assertNotNull(artifact); | 749 assertNotNull(artifact); |
750 log.debug("HorizontalCrossSectionMesh-Artifact is available"); | 750 log.debug("HorizontalCrossSectionMesh-Artifact is available"); |
751 | 751 |
752 CallContext cc = createCallContext(); | 752 CallContext cc = createCallContext(); |
753 Document describeDocument = this.readDocument("src/test/ressources/horizontalcrosssection_mesh/horizontalcrosssection_describe.xml"); | 753 Document describeDocument = this.readDocument("src/test/ressources/horizontalcrosssection_mesh/horizontalcrosssection_describe.xml"); |
754 // Erster Schritt | 754 int steps = 5; |
755 this | 755 |
756 .doNextStep( | 756 for (int i = 1; i <= steps; i++){ |
757 artifact, | 757 this.doNextStep( |
758 cc, | 758 artifact, |
759 "src/test/ressources/horizontalcrosssection_mesh/horizontalcrosssection_step_01_feed.xml", | 759 cc, |
760 "src/test/ressources/horizontalcrosssection_mesh/horizontalcrosssection_step_01_advance.xml", describeDocument); | 760 "src/test/ressources/horizontalcrosssection_mesh/" + |
761 | 761 "horizontalcrosssection_step_0"+i+"_feed.xml", |
762 // Zweiter Schritt | 762 "src/test/ressources/horizontalcrosssection_mesh/" + |
763 this | 763 "horizontalcrosssection_step_0"+i+"_advance.xml", |
764 .doNextStep( | 764 describeDocument); |
765 artifact, | 765 } |
766 cc, | 766 |
767 "src/test/ressources/horizontalcrosssection_mesh/horizontalcrosssection_step_02_feed.xml", | |
768 "src/test/ressources/horizontalcrosssection_mesh/horizontalcrosssection_step_02_advance.xml", describeDocument); | |
769 // Dritter Schritt | |
770 this | |
771 .doNextStep( | |
772 artifact, | |
773 cc, | |
774 "src/test/ressources/horizontalcrosssection_mesh/horizontalcrosssection_step_03_feed.xml", | |
775 "src/test/ressources/horizontalcrosssection_mesh/horizontalcrosssection_step_03_advance.xml", describeDocument); | |
776 // Vierter Schritt | |
777 this | |
778 .doNextStep( | |
779 artifact, | |
780 cc, | |
781 "src/test/ressources/horizontalcrosssection_mesh/horizontalcrosssection_step_04_feed.xml", | |
782 "src/test/ressources/horizontalcrosssection_mesh/horizontalcrosssection_step_04_advance.xml", describeDocument); | |
783 | |
784 // Fünfter Schritt | |
785 this | |
786 .doNextStep( | |
787 artifact, | |
788 cc, | |
789 "src/test/ressources/horizontalcrosssection_mesh/horizontalcrosssection_step_05_feed.xml", | |
790 "src/test/ressources/horizontalcrosssection_mesh/horizontalcrosssection_step_05_advance.xml", describeDocument); | |
791 | |
792 Document outputData = artifact.describe(describeDocument,cc); | 767 Document outputData = artifact.describe(describeDocument,cc); |
793 FileOutputStream fos = null; | 768 FileOutputStream fos = null; |
794 FileOutputStream fos2 = null; | 769 FileOutputStream fos2 = null; |
795 FileOutputStream fos3 = null; | 770 FileOutputStream fos3 = null; |
771 FileOutputStream fos4 = null; | |
796 try { | 772 try { |
797 fos = new FileOutputStream( | 773 fos = new FileOutputStream( |
798 "src/test/results/horizontalcrosssection_mesh" | 774 "src/test/results/horizontalcrosssection_mesh" |
799 + System.currentTimeMillis() + ".png"); | 775 + System.currentTimeMillis() + ".png"); |
800 fos2 = new FileOutputStream( | 776 fos2 = new FileOutputStream( |
801 "src/test/results/horizontalcrosssection_mesh" | 777 "src/test/results/horizontalcrosssection_mesh" |
802 + System.currentTimeMillis() + ".xml"); | 778 + System.currentTimeMillis() + ".xml"); |
803 fos3 = new FileOutputStream( | 779 fos3 = new FileOutputStream( |
804 "src/test/results/horizontalcrosssection_mesh" | 780 "src/test/results/horizontalcrosssection_mesh" |
805 + System.currentTimeMillis() + ".csv"); | 781 + System.currentTimeMillis() + ".csv"); |
806 artifact | 782 fos4 = new FileOutputStream( |
807 .feed(this.readDocument("src/test/ressources/horizontal" + | 783 "src/test/results/horizontalcrosssection_mesh" |
808 "crosssection_mesh/horizontalcrosssection_step_06_feed.xml"), | 784 + System.currentTimeMillis() + ".odv"); |
785 artifact.feed(this.readDocument("src/test/ressources/" + | |
786 "horizontalcrosssection_mesh/" + | |
787 "horizontalcrosssection_step_06_feed.xml"), | |
809 cc); | 788 cc); |
810 artifact | 789 artifact.out(this.readDocument("src/test/ressources/" + |
811 .out(this.readDocument("src/test/ressources/horizontal" + | 790 "horizontalcrosssection_mesh/" + |
812 "crosssection_mesh/horizontalcrosssection_step_06_out_statistics.xml"), | 791 "horizontalcrosssection_step_06_out_statistics.xml"), |
813 fos2, cc); | 792 fos2, cc); |
814 artifact | 793 artifact.out(this.readDocument("src/test/ressources/" + |
815 .out(this.readDocument("src/test/ressources/horizontal" + | 794 "horizontalcrosssection_mesh/" + |
816 "crosssection_mesh/horizontalcrosssection_step_06_out_chart.xml"), | 795 "horizontalcrosssection_step_06_out_chart.xml"), |
817 fos, cc); | 796 fos, cc); |
818 artifact.out(this.readDocument("src/test/ressources/horizontal" + | 797 artifact.out(this.readDocument("src/test/ressources/" + |
819 "crosssection_mesh/horizontalcrosssection_step_06_out_csv.xml"), | 798 "horizontalcrosssection_mesh/" + |
820 fos3, | 799 "horizontalcrosssection_step_06_out_csv.xml"), |
821 cc); | 800 fos3,cc); |
801 artifact.out(this.readDocument("src/test/ressources/" + | |
802 "horizontalcrosssection_mesh/" + | |
803 "horizontalcrosssection_step_06_out_odv.xml"), | |
804 fos4,cc); | |
822 } catch (Exception e) { | 805 } catch (Exception e) { |
823 log.error(e, e); | 806 log.error(e, e); |
824 fail(); | 807 fail(); |
825 } finally { | 808 } finally { |
826 try { | 809 try { |