# HG changeset patch # User Tim Englich # Date 1256902978 0 # Node ID f8cb64d5fe4f2ca0d3de19a374c3d9b322d490b9 # Parent 926530bda1a721c86714468176d8fc81d8025964 Added the Testcase for Horizontal Cross-Sections gnv-artifacts/trunk@279 c6561f87-3c4e-4783-a992-168aeb5c3f6f diff -r 926530bda1a7 -r f8cb64d5fe4f gnv-artifacts/ChangeLog --- a/gnv-artifacts/ChangeLog Fri Oct 30 11:26:03 2009 +0000 +++ b/gnv-artifacts/ChangeLog Fri Oct 30 11:42:58 2009 +0000 @@ -1,5 +1,11 @@ 2009-10-30 Tim Englich + * src/test/ressources/horizontalcrosssection_mesh/horizontalcrosssection_step_*.xml: + Added the Testdata for the Unittest for HorizontalCrossSectionMeshArtifacts. + * src/test/java/de/intevation/gnv/artifacts/GNVArtifactsTestCase.java (testHorizontalCrossSectionMeshArtifact): + Added the UnitTest-Case for HorizontalCrossSectionMeshArtifacts + +2009-10-30 Tim Englich * doc/conf/queries.properties: Added the Query for selecting the Data for generating Outputs of HorizontalCrossSectionMeshOutputTransition diff -r 926530bda1a7 -r f8cb64d5fe4f gnv-artifacts/src/test/java/de/intevation/gnv/artifacts/GNVArtifactsTestCase.java --- a/gnv-artifacts/src/test/java/de/intevation/gnv/artifacts/GNVArtifactsTestCase.java Fri Oct 30 11:26:03 2009 +0000 +++ b/gnv-artifacts/src/test/java/de/intevation/gnv/artifacts/GNVArtifactsTestCase.java Fri Oct 30 11:42:58 2009 +0000 @@ -870,6 +870,102 @@ } } + public void testHorizontalCrossSectionMeshArtifact() { + try { + log.debug("GNVArtifactsTestCase.testHorizontalCrossSectionMeshArtifact"); + String artefactName = "fis_modeldata"; + ArtifactFactory artifactFactory = this + .getArtifactFactory(artefactName); + assertNotNull(artifactFactory); + log.debug("HorizontalCrossSectionMesh-ArtifactFactory is available"); + Artifact artifact = artifactFactory.createArtifact( + "" + System.currentTimeMillis(), bootstrap.getContext()); + assertNotNull(artifact); + log.debug("HorizontalCrossSectionMesh-Artifact is available"); + + CallContext cc = createCallContext(); + + // Erster Schritt + this + .doNextStep( + artifact, + cc, + "src/test/ressources/horizontalcrosssection_mesh/horizontalcrosssection_step_01_feed.xml", + "src/test/ressources/horizontalcrosssection_mesh/horizontalcrosssection_step_01_advance.xml"); + + // Zweiter Schritt + this + .doNextStep( + artifact, + cc, + "src/test/ressources/horizontalcrosssection_mesh/horizontalcrosssection_step_02_feed.xml", + "src/test/ressources/horizontalcrosssection_mesh/horizontalcrosssection_step_02_advance.xml"); + // Dritter Schritt + this + .doNextStep( + artifact, + cc, + "src/test/ressources/horizontalcrosssection_mesh/horizontalcrosssection_step_03_feed.xml", + "src/test/ressources/horizontalcrosssection_mesh/horizontalcrosssection_step_03_advance.xml"); + // Vierter Schritt + this + .doNextStep( + artifact, + cc, + "src/test/ressources/horizontalcrosssection_mesh/horizontalcrosssection_step_04_feed.xml", + "src/test/ressources/horizontalcrosssection_mesh/horizontalcrosssection_step_04_advance.xml"); + + Document outputData = artifact.describe(cc); + FileOutputStream fos = null; + FileOutputStream fos2 = null; + FileOutputStream fos3 = null; + try { + fos = new FileOutputStream( + "src/test/results/horizontalcrosssection_mesh" + + System.currentTimeMillis() + ".png"); + fos2 = new FileOutputStream( + "src/test/results/horizontalcrosssection_mesh" + + System.currentTimeMillis() + ".xml"); + fos3 = new FileOutputStream( + "src/test/results/horizontalcrosssection_mesh" + + System.currentTimeMillis() + ".csv"); + artifact + .feed(this.readDocument("src/test/ressources/horizontal" + + "crosssection_mesh/horizontalcrosssection_step_05_feed.xml"), + cc); + artifact + .out(this.readDocument("src/test/ressources/horizontal" + + "crosssection_mesh/horizontalcrosssection_step_05_out_statistics.xml"), + fos2, cc); + artifact + .out(this.readDocument("src/test/ressources/horizontal" + + "crosssection_mesh/horizontalcrosssection_step_05_out_chart.xml"), + fos, cc); + artifact.out(this.readDocument("src/test/ressources/horizontal" + + "crosssection_mesh/horizontalcrosssection_step_05_out_csv.xml"), + fos3, + cc); + } catch (Exception e) { + log.error(e, e); + fail(); + } finally { + try { + fos.flush(); + fos.close(); + fos2.flush(); + fos2.close(); + fos3.flush(); + fos3.close(); + } catch (Exception e) { + log.error(e, e); + } + } + } catch (Exception e) { + log.error(e, e); + fail(); + } + } + public void testVerticalCrossSectionMeshArtifact() { try { log.debug("GNVArtifactsTestCase.testHVerticalCrossSectionMeshArtifact"); diff -r 926530bda1a7 -r f8cb64d5fe4f gnv-artifacts/src/test/ressources/horizontalcrosssection_mesh/horizontalcrosssection_step_01_advance.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/gnv-artifacts/src/test/ressources/horizontalcrosssection_mesh/horizontalcrosssection_step_01_advance.xml Fri Oct 30 11:42:58 2009 +0000 @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff -r 926530bda1a7 -r f8cb64d5fe4f gnv-artifacts/src/test/ressources/horizontalcrosssection_mesh/horizontalcrosssection_step_01_feed.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/gnv-artifacts/src/test/ressources/horizontalcrosssection_mesh/horizontalcrosssection_step_01_feed.xml Fri Oct 30 11:42:58 2009 +0000 @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff -r 926530bda1a7 -r f8cb64d5fe4f gnv-artifacts/src/test/ressources/horizontalcrosssection_mesh/horizontalcrosssection_step_02_advance.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/gnv-artifacts/src/test/ressources/horizontalcrosssection_mesh/horizontalcrosssection_step_02_advance.xml Fri Oct 30 11:42:58 2009 +0000 @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff -r 926530bda1a7 -r f8cb64d5fe4f gnv-artifacts/src/test/ressources/horizontalcrosssection_mesh/horizontalcrosssection_step_02_feed.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/gnv-artifacts/src/test/ressources/horizontalcrosssection_mesh/horizontalcrosssection_step_02_feed.xml Fri Oct 30 11:42:58 2009 +0000 @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff -r 926530bda1a7 -r f8cb64d5fe4f gnv-artifacts/src/test/ressources/horizontalcrosssection_mesh/horizontalcrosssection_step_03_advance.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/gnv-artifacts/src/test/ressources/horizontalcrosssection_mesh/horizontalcrosssection_step_03_advance.xml Fri Oct 30 11:42:58 2009 +0000 @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff -r 926530bda1a7 -r f8cb64d5fe4f gnv-artifacts/src/test/ressources/horizontalcrosssection_mesh/horizontalcrosssection_step_03_feed.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/gnv-artifacts/src/test/ressources/horizontalcrosssection_mesh/horizontalcrosssection_step_03_feed.xml Fri Oct 30 11:42:58 2009 +0000 @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff -r 926530bda1a7 -r f8cb64d5fe4f gnv-artifacts/src/test/ressources/horizontalcrosssection_mesh/horizontalcrosssection_step_04_advance.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/gnv-artifacts/src/test/ressources/horizontalcrosssection_mesh/horizontalcrosssection_step_04_advance.xml Fri Oct 30 11:42:58 2009 +0000 @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff -r 926530bda1a7 -r f8cb64d5fe4f gnv-artifacts/src/test/ressources/horizontalcrosssection_mesh/horizontalcrosssection_step_04_feed.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/gnv-artifacts/src/test/ressources/horizontalcrosssection_mesh/horizontalcrosssection_step_04_feed.xml Fri Oct 30 11:42:58 2009 +0000 @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff -r 926530bda1a7 -r f8cb64d5fe4f gnv-artifacts/src/test/ressources/horizontalcrosssection_mesh/horizontalcrosssection_step_05_feed.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/gnv-artifacts/src/test/ressources/horizontalcrosssection_mesh/horizontalcrosssection_step_05_feed.xml Fri Oct 30 11:42:58 2009 +0000 @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff -r 926530bda1a7 -r f8cb64d5fe4f gnv-artifacts/src/test/ressources/horizontalcrosssection_mesh/horizontalcrosssection_step_05_out_chart.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/gnv-artifacts/src/test/ressources/horizontalcrosssection_mesh/horizontalcrosssection_step_05_out_chart.xml Fri Oct 30 11:42:58 2009 +0000 @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff -r 926530bda1a7 -r f8cb64d5fe4f gnv-artifacts/src/test/ressources/horizontalcrosssection_mesh/horizontalcrosssection_step_05_out_csv.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/gnv-artifacts/src/test/ressources/horizontalcrosssection_mesh/horizontalcrosssection_step_05_out_csv.xml Fri Oct 30 11:42:58 2009 +0000 @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff -r 926530bda1a7 -r f8cb64d5fe4f gnv-artifacts/src/test/ressources/horizontalcrosssection_mesh/horizontalcrosssection_step_05_out_statistics.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/gnv-artifacts/src/test/ressources/horizontalcrosssection_mesh/horizontalcrosssection_step_05_out_statistics.xml Fri Oct 30 11:42:58 2009 +0000 @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file