Mercurial > dive4elements > gnv-client
annotate gnv-artifacts/src/test/java/de/intevation/gnv/artifacts/GNVArtifactsTestCase.java @ 326:37847d724fc9
Added one more Transitionstep to each Testcase according to the refactored Transitionmodel.
gnv-artifacts/trunk@392 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Tim Englich <tim.englich@intevation.de> |
---|---|
date | Tue, 01 Dec 2009 16:27:56 +0000 |
parents | 251f16a083f8 |
children |
rev | line source |
---|---|
52
4d6a82b96059
First Implementation of the GNV-Artifacts
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
1 /** |
4d6a82b96059
First Implementation of the GNV-Artifacts
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
2 * |
4d6a82b96059
First Implementation of the GNV-Artifacts
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
3 */ |
4d6a82b96059
First Implementation of the GNV-Artifacts
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
4 package de.intevation.gnv.artifacts; |
4d6a82b96059
First Implementation of the GNV-Artifacts
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
5 |
69
f24c825144bc
TestCase Refactored to the new Folder-Based Configuration.
Tim Englich <tim.englich@intevation.de>
parents:
62
diff
changeset
|
6 import java.io.ByteArrayInputStream; |
58
f31343d80d53
Artifact.advance initial implementiert
Tim Englich <tim.englich@intevation.de>
parents:
54
diff
changeset
|
7 import java.io.File; |
69
f24c825144bc
TestCase Refactored to the new Folder-Based Configuration.
Tim Englich <tim.englich@intevation.de>
parents:
62
diff
changeset
|
8 import java.io.FileNotFoundException; |
f24c825144bc
TestCase Refactored to the new Folder-Based Configuration.
Tim Englich <tim.englich@intevation.de>
parents:
62
diff
changeset
|
9 import java.io.FileOutputStream; |
58
f31343d80d53
Artifact.advance initial implementiert
Tim Englich <tim.englich@intevation.de>
parents:
54
diff
changeset
|
10 import java.io.IOException; |
54
09b4bf848c7b
2009-09-08 Tim Englich <tim.englich@intevation.de>
Tim Englich <tim.englich@intevation.de>
parents:
52
diff
changeset
|
11 |
58
f31343d80d53
Artifact.advance initial implementiert
Tim Englich <tim.englich@intevation.de>
parents:
54
diff
changeset
|
12 import javax.xml.parsers.DocumentBuilder; |
52
4d6a82b96059
First Implementation of the GNV-Artifacts
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
13 import javax.xml.parsers.DocumentBuilderFactory; |
4d6a82b96059
First Implementation of the GNV-Artifacts
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
14 import javax.xml.parsers.ParserConfigurationException; |
72
1fece4da4f2f
TestCase moved from TimeSeriesArtifact to FISArtifact. Used FIS: Marnet
Tim Englich <tim.englich@intevation.de>
parents:
69
diff
changeset
|
15 |
1fece4da4f2f
TestCase moved from TimeSeriesArtifact to FISArtifact. Used FIS: Marnet
Tim Englich <tim.englich@intevation.de>
parents:
69
diff
changeset
|
16 import junit.framework.TestCase; |
52
4d6a82b96059
First Implementation of the GNV-Artifacts
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
17 |
4d6a82b96059
First Implementation of the GNV-Artifacts
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
18 import org.apache.log4j.BasicConfigurator; |
4d6a82b96059
First Implementation of the GNV-Artifacts
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
19 import org.apache.log4j.Logger; |
4d6a82b96059
First Implementation of the GNV-Artifacts
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
20 import org.w3c.dom.Document; |
58
f31343d80d53
Artifact.advance initial implementiert
Tim Englich <tim.englich@intevation.de>
parents:
54
diff
changeset
|
21 import org.xml.sax.SAXException; |
52
4d6a82b96059
First Implementation of the GNV-Artifacts
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
22 |
4d6a82b96059
First Implementation of the GNV-Artifacts
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
23 import de.intevation.artifactdatabase.Config; |
117
ef157bd2fa92
LanguageSupport integrated
Tim Englich <tim.englich@intevation.de>
parents:
116
diff
changeset
|
24 import de.intevation.artifactdatabase.DefaultCallMeta; |
ef157bd2fa92
LanguageSupport integrated
Tim Englich <tim.englich@intevation.de>
parents:
116
diff
changeset
|
25 import de.intevation.artifactdatabase.DefaultPreferredLocale; |
52
4d6a82b96059
First Implementation of the GNV-Artifacts
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
26 import de.intevation.artifactdatabase.FactoryBootstrap; |
4d6a82b96059
First Implementation of the GNV-Artifacts
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
27 import de.intevation.artifacts.Artifact; |
4d6a82b96059
First Implementation of the GNV-Artifacts
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
28 import de.intevation.artifacts.ArtifactFactory; |
102
994a39b084d6
Imporved JUnitTest and Bugfixing as a Result of this Improvement.
Tim Englich <tim.englich@intevation.de>
parents:
73
diff
changeset
|
29 import de.intevation.artifacts.CallContext; |
117
ef157bd2fa92
LanguageSupport integrated
Tim Englich <tim.englich@intevation.de>
parents:
116
diff
changeset
|
30 import de.intevation.artifacts.CallMeta; |
ef157bd2fa92
LanguageSupport integrated
Tim Englich <tim.englich@intevation.de>
parents:
116
diff
changeset
|
31 import de.intevation.artifacts.PreferredLocale; |
52
4d6a82b96059
First Implementation of the GNV-Artifacts
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
32 import de.intevation.gnv.artifacts.context.GNVArtifactContext; |
72
1fece4da4f2f
TestCase moved from TimeSeriesArtifact to FISArtifact. Used FIS: Marnet
Tim Englich <tim.englich@intevation.de>
parents:
69
diff
changeset
|
33 import de.intevation.gnv.utils.ArtifactXMLUtilities; |
52
4d6a82b96059
First Implementation of the GNV-Artifacts
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
34 |
4d6a82b96059
First Implementation of the GNV-Artifacts
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
35 /** |
4d6a82b96059
First Implementation of the GNV-Artifacts
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
36 * @author Tim Englich <tim.englich@intevation.de> |
171
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
37 * |
52
4d6a82b96059
First Implementation of the GNV-Artifacts
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
38 */ |
4d6a82b96059
First Implementation of the GNV-Artifacts
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
39 public class GNVArtifactsTestCase extends TestCase { |
4d6a82b96059
First Implementation of the GNV-Artifacts
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
40 |
4d6a82b96059
First Implementation of the GNV-Artifacts
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
41 /** |
4d6a82b96059
First Implementation of the GNV-Artifacts
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
42 * the logger, used to log exceptions and additonaly information |
4d6a82b96059
First Implementation of the GNV-Artifacts
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
43 */ |
4d6a82b96059
First Implementation of the GNV-Artifacts
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
44 private static Logger log = null; |
171
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
45 |
52
4d6a82b96059
First Implementation of the GNV-Artifacts
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
46 static { |
4d6a82b96059
First Implementation of the GNV-Artifacts
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
47 BasicConfigurator.configure(); |
4d6a82b96059
First Implementation of the GNV-Artifacts
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
48 log = Logger.getLogger(GNVArtifactContext.class); |
4d6a82b96059
First Implementation of the GNV-Artifacts
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
49 } |
171
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
50 |
200
2f6a96610cb9
Changed Configuration Folder to doc/conf
Tim Englich <tim.englich@intevation.de>
parents:
197
diff
changeset
|
51 private String configurationDir = "doc/conf"; |
171
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
52 |
52
4d6a82b96059
First Implementation of the GNV-Artifacts
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
53 private FactoryBootstrap bootstrap = null; |
171
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
54 |
52
4d6a82b96059
First Implementation of the GNV-Artifacts
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
55 /** |
4d6a82b96059
First Implementation of the GNV-Artifacts
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
56 * Constructor |
171
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
57 * |
52
4d6a82b96059
First Implementation of the GNV-Artifacts
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
58 * @param name |
4d6a82b96059
First Implementation of the GNV-Artifacts
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
59 */ |
4d6a82b96059
First Implementation of the GNV-Artifacts
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
60 public GNVArtifactsTestCase(String name) { |
4d6a82b96059
First Implementation of the GNV-Artifacts
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
61 super(name); |
4d6a82b96059
First Implementation of the GNV-Artifacts
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
62 } |
4d6a82b96059
First Implementation of the GNV-Artifacts
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
63 |
4d6a82b96059
First Implementation of the GNV-Artifacts
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
64 /** |
4d6a82b96059
First Implementation of the GNV-Artifacts
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
65 * @see junit.framework.TestCase#setUp() |
4d6a82b96059
First Implementation of the GNV-Artifacts
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
66 */ |
4d6a82b96059
First Implementation of the GNV-Artifacts
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
67 protected void setUp() throws Exception { |
4d6a82b96059
First Implementation of the GNV-Artifacts
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
68 log.debug("GNVArtifactsTestCase.setUp"); |
4d6a82b96059
First Implementation of the GNV-Artifacts
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
69 super.setUp(); |
171
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
70 log.info(Config.CONFIG_DIR + " ==> " + configurationDir); |
69
f24c825144bc
TestCase Refactored to the new Folder-Based Configuration.
Tim Englich <tim.englich@intevation.de>
parents:
62
diff
changeset
|
71 System.setProperty(Config.CONFIG_DIR, configurationDir); |
52
4d6a82b96059
First Implementation of the GNV-Artifacts
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
72 log.info("Bootstrap wird initialisiert."); |
4d6a82b96059
First Implementation of the GNV-Artifacts
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
73 bootstrap = new FactoryBootstrap(); |
4d6a82b96059
First Implementation of the GNV-Artifacts
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
74 bootstrap.boot(); |
4d6a82b96059
First Implementation of the GNV-Artifacts
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
75 } |
171
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
76 |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
77 public void testTimeSeriesArtifact() { |
106
10d9a440f52e
ExceptionTest for Responsdocuments added.
Tim Englich <tim.englich@intevation.de>
parents:
105
diff
changeset
|
78 try { |
10d9a440f52e
ExceptionTest for Responsdocuments added.
Tim Englich <tim.englich@intevation.de>
parents:
105
diff
changeset
|
79 log.debug("GNVArtifactsTestCase.testTimeSeriesArtifact"); |
171
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
80 String artefactName = "fis_marnet"; |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
81 ArtifactFactory artifactFactory = this |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
82 .getArtifactFactory(artefactName); |
106
10d9a440f52e
ExceptionTest for Responsdocuments added.
Tim Englich <tim.englich@intevation.de>
parents:
105
diff
changeset
|
83 assertNotNull(artifactFactory); |
10d9a440f52e
ExceptionTest for Responsdocuments added.
Tim Englich <tim.englich@intevation.de>
parents:
105
diff
changeset
|
84 log.debug("TimeSeries-ArtifactFactory is available"); |
171
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
85 Artifact artifact = artifactFactory.createArtifact( |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
86 "" + System.currentTimeMillis(), bootstrap.getContext()); |
106
10d9a440f52e
ExceptionTest for Responsdocuments added.
Tim Englich <tim.englich@intevation.de>
parents:
105
diff
changeset
|
87 assertNotNull(artifact); |
10d9a440f52e
ExceptionTest for Responsdocuments added.
Tim Englich <tim.englich@intevation.de>
parents:
105
diff
changeset
|
88 log.debug("TimeSeries-Artifact is available"); |
171
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
89 |
117
ef157bd2fa92
LanguageSupport integrated
Tim Englich <tim.englich@intevation.de>
parents:
116
diff
changeset
|
90 CallContext cc = createCallContext(); |
171
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
91 |
106
10d9a440f52e
ExceptionTest for Responsdocuments added.
Tim Englich <tim.englich@intevation.de>
parents:
105
diff
changeset
|
92 // Erster Schritt |
171
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
93 |
222
3e82b4f1c455
Removed some Compilation-Errors according to API-Changes in the ArtifactDatabase.
Tim Englich <tim.englich@intevation.de>
parents:
219
diff
changeset
|
94 Document describeDocument = this.readDocument("src/test/ressources/timeseries/timeseries_describe.xml"); |
232
3d6d89bcbf42
Added special Data-Selection to the ODV-Exports of TimeSeries on TimeSeriesPoints. issue68
Tim Englich <tim.englich@intevation.de>
parents:
229
diff
changeset
|
95 |
326
37847d724fc9
Added one more Transitionstep to each Testcase according to the refactored Transitionmodel.
Tim Englich <tim.englich@intevation.de>
parents:
319
diff
changeset
|
96 int steps = 6; |
232
3d6d89bcbf42
Added special Data-Selection to the ODV-Exports of TimeSeries on TimeSeriesPoints. issue68
Tim Englich <tim.englich@intevation.de>
parents:
229
diff
changeset
|
97 |
3d6d89bcbf42
Added special Data-Selection to the ODV-Exports of TimeSeries on TimeSeriesPoints. issue68
Tim Englich <tim.englich@intevation.de>
parents:
229
diff
changeset
|
98 for (int i = 1; i <= steps; i++){ |
3d6d89bcbf42
Added special Data-Selection to the ODV-Exports of TimeSeries on TimeSeriesPoints. issue68
Tim Englich <tim.englich@intevation.de>
parents:
229
diff
changeset
|
99 |
240
76897b73db4e
Added ODV-Export-Support to TimeSeries Mesh
Tim Englich <tim.englich@intevation.de>
parents:
232
diff
changeset
|
100 this.doNextStep( |
171
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
101 artifact, |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
102 cc, |
232
3d6d89bcbf42
Added special Data-Selection to the ODV-Exports of TimeSeries on TimeSeriesPoints. issue68
Tim Englich <tim.englich@intevation.de>
parents:
229
diff
changeset
|
103 "src/test/ressources/timeseries/" + |
3d6d89bcbf42
Added special Data-Selection to the ODV-Exports of TimeSeries on TimeSeriesPoints. issue68
Tim Englich <tim.englich@intevation.de>
parents:
229
diff
changeset
|
104 "timeseries_step_0"+i+"_feed.xml", |
3d6d89bcbf42
Added special Data-Selection to the ODV-Exports of TimeSeries on TimeSeriesPoints. issue68
Tim Englich <tim.englich@intevation.de>
parents:
229
diff
changeset
|
105 "src/test/ressources/timeseries/" + |
3d6d89bcbf42
Added special Data-Selection to the ODV-Exports of TimeSeries on TimeSeriesPoints. issue68
Tim Englich <tim.englich@intevation.de>
parents:
229
diff
changeset
|
106 "timeseries_step_0"+i+"_advance.xml", |
3d6d89bcbf42
Added special Data-Selection to the ODV-Exports of TimeSeries on TimeSeriesPoints. issue68
Tim Englich <tim.englich@intevation.de>
parents:
229
diff
changeset
|
107 describeDocument); |
3d6d89bcbf42
Added special Data-Selection to the ODV-Exports of TimeSeries on TimeSeriesPoints. issue68
Tim Englich <tim.englich@intevation.de>
parents:
229
diff
changeset
|
108 } |
3d6d89bcbf42
Added special Data-Selection to the ODV-Exports of TimeSeries on TimeSeriesPoints. issue68
Tim Englich <tim.englich@intevation.de>
parents:
229
diff
changeset
|
109 |
3d6d89bcbf42
Added special Data-Selection to the ODV-Exports of TimeSeries on TimeSeriesPoints. issue68
Tim Englich <tim.englich@intevation.de>
parents:
229
diff
changeset
|
110 Document outputData = artifact.describe(describeDocument,cc); |
106
10d9a440f52e
ExceptionTest for Responsdocuments added.
Tim Englich <tim.englich@intevation.de>
parents:
105
diff
changeset
|
111 FileOutputStream fos = null; |
232
3d6d89bcbf42
Added special Data-Selection to the ODV-Exports of TimeSeries on TimeSeriesPoints. issue68
Tim Englich <tim.englich@intevation.de>
parents:
229
diff
changeset
|
112 FileOutputStream fos2 = null; |
3d6d89bcbf42
Added special Data-Selection to the ODV-Exports of TimeSeries on TimeSeriesPoints. issue68
Tim Englich <tim.englich@intevation.de>
parents:
229
diff
changeset
|
113 FileOutputStream fos3 = null; |
3d6d89bcbf42
Added special Data-Selection to the ODV-Exports of TimeSeries on TimeSeriesPoints. issue68
Tim Englich <tim.englich@intevation.de>
parents:
229
diff
changeset
|
114 FileOutputStream fos4 = null; |
171
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
115 try { |
232
3d6d89bcbf42
Added special Data-Selection to the ODV-Exports of TimeSeries on TimeSeriesPoints. issue68
Tim Englich <tim.englich@intevation.de>
parents:
229
diff
changeset
|
116 fos = new FileOutputStream("src/test/results/timeseries" |
3d6d89bcbf42
Added special Data-Selection to the ODV-Exports of TimeSeries on TimeSeriesPoints. issue68
Tim Englich <tim.englich@intevation.de>
parents:
229
diff
changeset
|
117 + System.currentTimeMillis() |
3d6d89bcbf42
Added special Data-Selection to the ODV-Exports of TimeSeries on TimeSeriesPoints. issue68
Tim Englich <tim.englich@intevation.de>
parents:
229
diff
changeset
|
118 + ".png"); |
3d6d89bcbf42
Added special Data-Selection to the ODV-Exports of TimeSeries on TimeSeriesPoints. issue68
Tim Englich <tim.englich@intevation.de>
parents:
229
diff
changeset
|
119 fos2 = new FileOutputStream("src/test/results/timeseries" |
3d6d89bcbf42
Added special Data-Selection to the ODV-Exports of TimeSeries on TimeSeriesPoints. issue68
Tim Englich <tim.englich@intevation.de>
parents:
229
diff
changeset
|
120 + System.currentTimeMillis() |
3d6d89bcbf42
Added special Data-Selection to the ODV-Exports of TimeSeries on TimeSeriesPoints. issue68
Tim Englich <tim.englich@intevation.de>
parents:
229
diff
changeset
|
121 + ".xml"); |
3d6d89bcbf42
Added special Data-Selection to the ODV-Exports of TimeSeries on TimeSeriesPoints. issue68
Tim Englich <tim.englich@intevation.de>
parents:
229
diff
changeset
|
122 fos3 = new FileOutputStream("src/test/results/timeseries" |
3d6d89bcbf42
Added special Data-Selection to the ODV-Exports of TimeSeries on TimeSeriesPoints. issue68
Tim Englich <tim.englich@intevation.de>
parents:
229
diff
changeset
|
123 + System.currentTimeMillis() |
3d6d89bcbf42
Added special Data-Selection to the ODV-Exports of TimeSeries on TimeSeriesPoints. issue68
Tim Englich <tim.englich@intevation.de>
parents:
229
diff
changeset
|
124 + ".csv"); |
3d6d89bcbf42
Added special Data-Selection to the ODV-Exports of TimeSeries on TimeSeriesPoints. issue68
Tim Englich <tim.englich@intevation.de>
parents:
229
diff
changeset
|
125 fos4 = new FileOutputStream("src/test/results/timeseries" |
3d6d89bcbf42
Added special Data-Selection to the ODV-Exports of TimeSeries on TimeSeriesPoints. issue68
Tim Englich <tim.englich@intevation.de>
parents:
229
diff
changeset
|
126 + System.currentTimeMillis() |
3d6d89bcbf42
Added special Data-Selection to the ODV-Exports of TimeSeries on TimeSeriesPoints. issue68
Tim Englich <tim.englich@intevation.de>
parents:
229
diff
changeset
|
127 + ".odv"); |
3d6d89bcbf42
Added special Data-Selection to the ODV-Exports of TimeSeries on TimeSeriesPoints. issue68
Tim Englich <tim.englich@intevation.de>
parents:
229
diff
changeset
|
128 |
3d6d89bcbf42
Added special Data-Selection to the ODV-Exports of TimeSeries on TimeSeriesPoints. issue68
Tim Englich <tim.englich@intevation.de>
parents:
229
diff
changeset
|
129 artifact.out(this |
3d6d89bcbf42
Added special Data-Selection to the ODV-Exports of TimeSeries on TimeSeriesPoints. issue68
Tim Englich <tim.englich@intevation.de>
parents:
229
diff
changeset
|
130 .readDocument("src/test/ressources/timeseries/timeseries_step_06_out_chart.xml"), |
3d6d89bcbf42
Added special Data-Selection to the ODV-Exports of TimeSeries on TimeSeriesPoints. issue68
Tim Englich <tim.englich@intevation.de>
parents:
229
diff
changeset
|
131 fos, cc); |
3d6d89bcbf42
Added special Data-Selection to the ODV-Exports of TimeSeries on TimeSeriesPoints. issue68
Tim Englich <tim.englich@intevation.de>
parents:
229
diff
changeset
|
132 artifact.out(this |
3d6d89bcbf42
Added special Data-Selection to the ODV-Exports of TimeSeries on TimeSeriesPoints. issue68
Tim Englich <tim.englich@intevation.de>
parents:
229
diff
changeset
|
133 .readDocument("src/test/ressources/timeseries/timeseries_step_06_out_statistics.xml"), |
3d6d89bcbf42
Added special Data-Selection to the ODV-Exports of TimeSeries on TimeSeriesPoints. issue68
Tim Englich <tim.englich@intevation.de>
parents:
229
diff
changeset
|
134 fos2, cc); |
3d6d89bcbf42
Added special Data-Selection to the ODV-Exports of TimeSeries on TimeSeriesPoints. issue68
Tim Englich <tim.englich@intevation.de>
parents:
229
diff
changeset
|
135 artifact.out(this |
3d6d89bcbf42
Added special Data-Selection to the ODV-Exports of TimeSeries on TimeSeriesPoints. issue68
Tim Englich <tim.englich@intevation.de>
parents:
229
diff
changeset
|
136 .readDocument("src/test/ressources/timeseries/timeseries_step_06_out_csv.xml"), |
3d6d89bcbf42
Added special Data-Selection to the ODV-Exports of TimeSeries on TimeSeriesPoints. issue68
Tim Englich <tim.englich@intevation.de>
parents:
229
diff
changeset
|
137 fos3, cc); |
3d6d89bcbf42
Added special Data-Selection to the ODV-Exports of TimeSeries on TimeSeriesPoints. issue68
Tim Englich <tim.englich@intevation.de>
parents:
229
diff
changeset
|
138 artifact.out(this |
3d6d89bcbf42
Added special Data-Selection to the ODV-Exports of TimeSeries on TimeSeriesPoints. issue68
Tim Englich <tim.englich@intevation.de>
parents:
229
diff
changeset
|
139 .readDocument("src/test/ressources/timeseries/timeseries_step_06_out_odv.xml"), |
3d6d89bcbf42
Added special Data-Selection to the ODV-Exports of TimeSeries on TimeSeriesPoints. issue68
Tim Englich <tim.englich@intevation.de>
parents:
229
diff
changeset
|
140 fos4, cc); |
171
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
141 } catch (Exception e) { |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
142 log.error(e, e); |
106
10d9a440f52e
ExceptionTest for Responsdocuments added.
Tim Englich <tim.englich@intevation.de>
parents:
105
diff
changeset
|
143 fail(); |
171
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
144 } finally { |
106
10d9a440f52e
ExceptionTest for Responsdocuments added.
Tim Englich <tim.englich@intevation.de>
parents:
105
diff
changeset
|
145 try { |
10d9a440f52e
ExceptionTest for Responsdocuments added.
Tim Englich <tim.englich@intevation.de>
parents:
105
diff
changeset
|
146 fos.flush(); |
10d9a440f52e
ExceptionTest for Responsdocuments added.
Tim Englich <tim.englich@intevation.de>
parents:
105
diff
changeset
|
147 fos.close(); |
10d9a440f52e
ExceptionTest for Responsdocuments added.
Tim Englich <tim.englich@intevation.de>
parents:
105
diff
changeset
|
148 } catch (Exception e) { |
171
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
149 log.error(e, e); |
106
10d9a440f52e
ExceptionTest for Responsdocuments added.
Tim Englich <tim.englich@intevation.de>
parents:
105
diff
changeset
|
150 } |
10d9a440f52e
ExceptionTest for Responsdocuments added.
Tim Englich <tim.englich@intevation.de>
parents:
105
diff
changeset
|
151 } |
10d9a440f52e
ExceptionTest for Responsdocuments added.
Tim Englich <tim.englich@intevation.de>
parents:
105
diff
changeset
|
152 } catch (Exception e) { |
171
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
153 log.error(e, e); |
73
504570de21fd
Refactoring Work depending on Infrastructurchanges in the Artifact-Module
Tim Englich <tim.englich@intevation.de>
parents:
72
diff
changeset
|
154 fail(); |
504570de21fd
Refactoring Work depending on Infrastructurchanges in the Artifact-Module
Tim Englich <tim.englich@intevation.de>
parents:
72
diff
changeset
|
155 } |
52
4d6a82b96059
First Implementation of the GNV-Artifacts
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
156 } |
109
678aad19a08d
Some Coderedundances refactored.
Tim Englich <tim.englich@intevation.de>
parents:
107
diff
changeset
|
157 |
678aad19a08d
Some Coderedundances refactored.
Tim Englich <tim.englich@intevation.de>
parents:
107
diff
changeset
|
158 /** |
117
ef157bd2fa92
LanguageSupport integrated
Tim Englich <tim.englich@intevation.de>
parents:
116
diff
changeset
|
159 * @return |
ef157bd2fa92
LanguageSupport integrated
Tim Englich <tim.englich@intevation.de>
parents:
116
diff
changeset
|
160 */ |
ef157bd2fa92
LanguageSupport integrated
Tim Englich <tim.englich@intevation.de>
parents:
116
diff
changeset
|
161 private CallContext createCallContext() { |
171
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
162 CallMeta callMeta = new DefaultCallMeta( |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
163 new PreferredLocale[] { new DefaultPreferredLocale("de_DE", |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
164 1.0f) }); |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
165 CallContext cc = new TestCallContext(bootstrap.getContext(), callMeta); |
117
ef157bd2fa92
LanguageSupport integrated
Tim Englich <tim.englich@intevation.de>
parents:
116
diff
changeset
|
166 return cc; |
ef157bd2fa92
LanguageSupport integrated
Tim Englich <tim.englich@intevation.de>
parents:
116
diff
changeset
|
167 } |
ef157bd2fa92
LanguageSupport integrated
Tim Englich <tim.englich@intevation.de>
parents:
116
diff
changeset
|
168 |
ef157bd2fa92
LanguageSupport integrated
Tim Englich <tim.englich@intevation.de>
parents:
116
diff
changeset
|
169 /** |
109
678aad19a08d
Some Coderedundances refactored.
Tim Englich <tim.englich@intevation.de>
parents:
107
diff
changeset
|
170 * @param artifact |
678aad19a08d
Some Coderedundances refactored.
Tim Englich <tim.englich@intevation.de>
parents:
107
diff
changeset
|
171 * @param cc |
222
3e82b4f1c455
Removed some Compilation-Errors according to API-Changes in the ArtifactDatabase.
Tim Englich <tim.englich@intevation.de>
parents:
219
diff
changeset
|
172 * @param describeDocument TODO |
109
678aad19a08d
Some Coderedundances refactored.
Tim Englich <tim.englich@intevation.de>
parents:
107
diff
changeset
|
173 * @throws Exception |
678aad19a08d
Some Coderedundances refactored.
Tim Englich <tim.englich@intevation.de>
parents:
107
diff
changeset
|
174 */ |
171
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
175 private void doNextStep(Artifact artifact, CallContext cc, |
222
3e82b4f1c455
Removed some Compilation-Errors according to API-Changes in the ArtifactDatabase.
Tim Englich <tim.englich@intevation.de>
parents:
219
diff
changeset
|
176 String feedDocument, String advanceDocument, Document describeDocument) |
171
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
177 throws Exception { |
222
3e82b4f1c455
Removed some Compilation-Errors according to API-Changes in the ArtifactDatabase.
Tim Englich <tim.englich@intevation.de>
parents:
219
diff
changeset
|
178 Document outputData = artifact.describe(describeDocument,cc); |
211
310874d3573f
Minimum and Maximum Depth should be entered by the User issue31
Tim Englich <tim.englich@intevation.de>
parents:
200
diff
changeset
|
179 // this.writeDocument2Log(outputData); |
111
065ec0a29394
Integrate the type Point into the ArtifactMethod.
Tim Englich <tim.englich@intevation.de>
parents:
109
diff
changeset
|
180 outputData = artifact.feed(this.readDocument(feedDocument), cc); |
065ec0a29394
Integrate the type Point into the ArtifactMethod.
Tim Englich <tim.englich@intevation.de>
parents:
109
diff
changeset
|
181 this.check4ExceptionReport(outputData); |
109
678aad19a08d
Some Coderedundances refactored.
Tim Englich <tim.englich@intevation.de>
parents:
107
diff
changeset
|
182 outputData = artifact.advance(this.readDocument(advanceDocument), cc); |
211
310874d3573f
Minimum and Maximum Depth should be entered by the User issue31
Tim Englich <tim.englich@intevation.de>
parents:
200
diff
changeset
|
183 // this.writeDocument2Log(outputData); |
109
678aad19a08d
Some Coderedundances refactored.
Tim Englich <tim.englich@intevation.de>
parents:
107
diff
changeset
|
184 this.check4ExceptionReport(outputData); |
171
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
185 |
109
678aad19a08d
Some Coderedundances refactored.
Tim Englich <tim.englich@intevation.de>
parents:
107
diff
changeset
|
186 } |
171
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
187 |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
188 public void testTimeSeriesMeshArtifact() { |
107
4ebf9ad2e7eb
Added TestCase for TimeSeriesMesh
Tim Englich <tim.englich@intevation.de>
parents:
106
diff
changeset
|
189 try { |
4ebf9ad2e7eb
Added TestCase for TimeSeriesMesh
Tim Englich <tim.englich@intevation.de>
parents:
106
diff
changeset
|
190 log.debug("GNVArtifactsTestCase.testTimeSeriesMeshArtifact"); |
171
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
191 String artefactName = "fis_modeldata"; |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
192 ArtifactFactory artifactFactory = this |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
193 .getArtifactFactory(artefactName); |
107
4ebf9ad2e7eb
Added TestCase for TimeSeriesMesh
Tim Englich <tim.englich@intevation.de>
parents:
106
diff
changeset
|
194 assertNotNull(artifactFactory); |
4ebf9ad2e7eb
Added TestCase for TimeSeriesMesh
Tim Englich <tim.englich@intevation.de>
parents:
106
diff
changeset
|
195 log.debug("TimeSeriesMesh-ArtifactFactory is available"); |
171
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
196 Artifact artifact = artifactFactory.createArtifact( |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
197 "" + System.currentTimeMillis(), bootstrap.getContext()); |
107
4ebf9ad2e7eb
Added TestCase for TimeSeriesMesh
Tim Englich <tim.englich@intevation.de>
parents:
106
diff
changeset
|
198 assertNotNull(artifact); |
4ebf9ad2e7eb
Added TestCase for TimeSeriesMesh
Tim Englich <tim.englich@intevation.de>
parents:
106
diff
changeset
|
199 log.debug("TimeSeriesMesh-Artifact is available"); |
171
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
200 |
117
ef157bd2fa92
LanguageSupport integrated
Tim Englich <tim.englich@intevation.de>
parents:
116
diff
changeset
|
201 CallContext cc = createCallContext(); |
171
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
202 |
222
3e82b4f1c455
Removed some Compilation-Errors according to API-Changes in the ArtifactDatabase.
Tim Englich <tim.englich@intevation.de>
parents:
219
diff
changeset
|
203 Document describeDocument = this.readDocument("src/test/ressources/timeseries_mesh/timeseries_describe.xml"); |
240
76897b73db4e
Added ODV-Export-Support to TimeSeries Mesh
Tim Englich <tim.englich@intevation.de>
parents:
232
diff
changeset
|
204 |
326
37847d724fc9
Added one more Transitionstep to each Testcase according to the refactored Transitionmodel.
Tim Englich <tim.englich@intevation.de>
parents:
319
diff
changeset
|
205 int steps = 8; |
240
76897b73db4e
Added ODV-Export-Support to TimeSeries Mesh
Tim Englich <tim.englich@intevation.de>
parents:
232
diff
changeset
|
206 |
76897b73db4e
Added ODV-Export-Support to TimeSeries Mesh
Tim Englich <tim.englich@intevation.de>
parents:
232
diff
changeset
|
207 for (int i = 1; i <= steps; i++){ |
76897b73db4e
Added ODV-Export-Support to TimeSeries Mesh
Tim Englich <tim.englich@intevation.de>
parents:
232
diff
changeset
|
208 this.doNextStep( |
171
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
209 artifact, |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
210 cc, |
240
76897b73db4e
Added ODV-Export-Support to TimeSeries Mesh
Tim Englich <tim.englich@intevation.de>
parents:
232
diff
changeset
|
211 "src/test/ressources/timeseries_mesh/" + |
76897b73db4e
Added ODV-Export-Support to TimeSeries Mesh
Tim Englich <tim.englich@intevation.de>
parents:
232
diff
changeset
|
212 "timeseries_step_0"+i+"_feed.xml", |
76897b73db4e
Added ODV-Export-Support to TimeSeries Mesh
Tim Englich <tim.englich@intevation.de>
parents:
232
diff
changeset
|
213 "src/test/ressources/timeseries_mesh/" + |
76897b73db4e
Added ODV-Export-Support to TimeSeries Mesh
Tim Englich <tim.englich@intevation.de>
parents:
232
diff
changeset
|
214 "timeseries_step_0"+i+"_advance.xml", |
76897b73db4e
Added ODV-Export-Support to TimeSeries Mesh
Tim Englich <tim.englich@intevation.de>
parents:
232
diff
changeset
|
215 describeDocument); |
76897b73db4e
Added ODV-Export-Support to TimeSeries Mesh
Tim Englich <tim.englich@intevation.de>
parents:
232
diff
changeset
|
216 } |
229
a610c0a01afc
Added the Region-Filter to the Workflow of the Artifacttescases to be able to test it automatically.
Tim Englich <tim.englich@intevation.de>
parents:
222
diff
changeset
|
217 // Achter Schritt |
222
3e82b4f1c455
Removed some Compilation-Errors according to API-Changes in the ArtifactDatabase.
Tim Englich <tim.englich@intevation.de>
parents:
219
diff
changeset
|
218 Document outputData = artifact.describe(describeDocument,cc); |
107
4ebf9ad2e7eb
Added TestCase for TimeSeriesMesh
Tim Englich <tim.englich@intevation.de>
parents:
106
diff
changeset
|
219 FileOutputStream fos = null; |
4ebf9ad2e7eb
Added TestCase for TimeSeriesMesh
Tim Englich <tim.englich@intevation.de>
parents:
106
diff
changeset
|
220 FileOutputStream fos2 = null; |
4ebf9ad2e7eb
Added TestCase for TimeSeriesMesh
Tim Englich <tim.englich@intevation.de>
parents:
106
diff
changeset
|
221 FileOutputStream fos3 = null; |
240
76897b73db4e
Added ODV-Export-Support to TimeSeries Mesh
Tim Englich <tim.englich@intevation.de>
parents:
232
diff
changeset
|
222 FileOutputStream fos4 = null; |
171
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
223 try { |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
224 fos = new FileOutputStream("src/test/results/timeseries_mesh" |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
225 + System.currentTimeMillis() |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
226 + ".png"); |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
227 fos2 = new FileOutputStream("src/test/results/timeseries_mesh" |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
228 + System.currentTimeMillis() |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
229 + ".xml"); |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
230 fos3 = new FileOutputStream("src/test/results/timeseries_mesh" |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
231 + System.currentTimeMillis() |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
232 + ".csv"); |
240
76897b73db4e
Added ODV-Export-Support to TimeSeries Mesh
Tim Englich <tim.englich@intevation.de>
parents:
232
diff
changeset
|
233 fos4 = new FileOutputStream("src/test/results/timeseries_mesh" |
76897b73db4e
Added ODV-Export-Support to TimeSeries Mesh
Tim Englich <tim.englich@intevation.de>
parents:
232
diff
changeset
|
234 + System.currentTimeMillis() |
76897b73db4e
Added ODV-Export-Support to TimeSeries Mesh
Tim Englich <tim.englich@intevation.de>
parents:
232
diff
changeset
|
235 + ".odv"); |
171
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
236 artifact |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
237 .out( |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
238 this |
229
a610c0a01afc
Added the Region-Filter to the Workflow of the Artifacttescases to be able to test it automatically.
Tim Englich <tim.englich@intevation.de>
parents:
222
diff
changeset
|
239 .readDocument("src/test/ressources/timeseries_mesh/timeseries_step_08_out_statistics.xml"), |
171
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
240 fos2, cc); |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
241 artifact |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
242 .out( |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
243 this |
229
a610c0a01afc
Added the Region-Filter to the Workflow of the Artifacttescases to be able to test it automatically.
Tim Englich <tim.englich@intevation.de>
parents:
222
diff
changeset
|
244 .readDocument("src/test/ressources/timeseries_mesh/timeseries_step_08_out_chart.xml"), |
171
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
245 fos, cc); |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
246 artifact |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
247 .out( |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
248 this |
229
a610c0a01afc
Added the Region-Filter to the Workflow of the Artifacttescases to be able to test it automatically.
Tim Englich <tim.englich@intevation.de>
parents:
222
diff
changeset
|
249 .readDocument("src/test/ressources/timeseries_mesh/timeseries_step_08_out_csv.xml"), |
171
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
250 fos3, cc); |
240
76897b73db4e
Added ODV-Export-Support to TimeSeries Mesh
Tim Englich <tim.englich@intevation.de>
parents:
232
diff
changeset
|
251 artifact |
76897b73db4e
Added ODV-Export-Support to TimeSeries Mesh
Tim Englich <tim.englich@intevation.de>
parents:
232
diff
changeset
|
252 .out( |
76897b73db4e
Added ODV-Export-Support to TimeSeries Mesh
Tim Englich <tim.englich@intevation.de>
parents:
232
diff
changeset
|
253 this |
76897b73db4e
Added ODV-Export-Support to TimeSeries Mesh
Tim Englich <tim.englich@intevation.de>
parents:
232
diff
changeset
|
254 .readDocument("src/test/ressources/timeseries_mesh/timeseries_step_08_out_odv.xml"), |
76897b73db4e
Added ODV-Export-Support to TimeSeries Mesh
Tim Englich <tim.englich@intevation.de>
parents:
232
diff
changeset
|
255 fos4, cc); |
171
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
256 } catch (Exception e) { |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
257 log.error(e, e); |
107
4ebf9ad2e7eb
Added TestCase for TimeSeriesMesh
Tim Englich <tim.englich@intevation.de>
parents:
106
diff
changeset
|
258 fail(); |
171
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
259 } finally { |
106
10d9a440f52e
ExceptionTest for Responsdocuments added.
Tim Englich <tim.englich@intevation.de>
parents:
105
diff
changeset
|
260 try { |
10d9a440f52e
ExceptionTest for Responsdocuments added.
Tim Englich <tim.englich@intevation.de>
parents:
105
diff
changeset
|
261 fos.flush(); |
10d9a440f52e
ExceptionTest for Responsdocuments added.
Tim Englich <tim.englich@intevation.de>
parents:
105
diff
changeset
|
262 fos.close(); |
10d9a440f52e
ExceptionTest for Responsdocuments added.
Tim Englich <tim.englich@intevation.de>
parents:
105
diff
changeset
|
263 fos2.flush(); |
10d9a440f52e
ExceptionTest for Responsdocuments added.
Tim Englich <tim.englich@intevation.de>
parents:
105
diff
changeset
|
264 fos2.close(); |
10d9a440f52e
ExceptionTest for Responsdocuments added.
Tim Englich <tim.englich@intevation.de>
parents:
105
diff
changeset
|
265 fos3.flush(); |
10d9a440f52e
ExceptionTest for Responsdocuments added.
Tim Englich <tim.englich@intevation.de>
parents:
105
diff
changeset
|
266 fos3.close(); |
10d9a440f52e
ExceptionTest for Responsdocuments added.
Tim Englich <tim.englich@intevation.de>
parents:
105
diff
changeset
|
267 } catch (Exception e) { |
171
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
268 log.error(e, e); |
106
10d9a440f52e
ExceptionTest for Responsdocuments added.
Tim Englich <tim.englich@intevation.de>
parents:
105
diff
changeset
|
269 } |
10d9a440f52e
ExceptionTest for Responsdocuments added.
Tim Englich <tim.englich@intevation.de>
parents:
105
diff
changeset
|
270 } |
10d9a440f52e
ExceptionTest for Responsdocuments added.
Tim Englich <tim.englich@intevation.de>
parents:
105
diff
changeset
|
271 } catch (Exception e) { |
171
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
272 log.error(e, e); |
103
4042844339ee
Testcases for VerticalProfile and VerticalProfile Instantaneouspoint added
Tim Englich <tim.englich@intevation.de>
parents:
102
diff
changeset
|
273 fail(); |
4042844339ee
Testcases for VerticalProfile and VerticalProfile Instantaneouspoint added
Tim Englich <tim.englich@intevation.de>
parents:
102
diff
changeset
|
274 } |
4042844339ee
Testcases for VerticalProfile and VerticalProfile Instantaneouspoint added
Tim Englich <tim.englich@intevation.de>
parents:
102
diff
changeset
|
275 } |
171
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
276 |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
277 public void testVerticalProfileArtifact() { |
106
10d9a440f52e
ExceptionTest for Responsdocuments added.
Tim Englich <tim.englich@intevation.de>
parents:
105
diff
changeset
|
278 try { |
10d9a440f52e
ExceptionTest for Responsdocuments added.
Tim Englich <tim.englich@intevation.de>
parents:
105
diff
changeset
|
279 log.debug("GNVArtifactsTestCase.testVerticalProfileArtifact"); |
171
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
280 String artefactName = "fis_marnet"; |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
281 ArtifactFactory artifactFactory = this |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
282 .getArtifactFactory(artefactName); |
106
10d9a440f52e
ExceptionTest for Responsdocuments added.
Tim Englich <tim.englich@intevation.de>
parents:
105
diff
changeset
|
283 assertNotNull(artifactFactory); |
10d9a440f52e
ExceptionTest for Responsdocuments added.
Tim Englich <tim.englich@intevation.de>
parents:
105
diff
changeset
|
284 log.debug("VerticalProfile-ArtifactFactory is available"); |
171
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
285 Artifact artifact = artifactFactory.createArtifact( |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
286 "" + System.currentTimeMillis(), bootstrap.getContext()); |
106
10d9a440f52e
ExceptionTest for Responsdocuments added.
Tim Englich <tim.englich@intevation.de>
parents:
105
diff
changeset
|
287 assertNotNull(artifact); |
10d9a440f52e
ExceptionTest for Responsdocuments added.
Tim Englich <tim.englich@intevation.de>
parents:
105
diff
changeset
|
288 log.debug("VerticalProfile-Artifact is available"); |
171
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
289 |
117
ef157bd2fa92
LanguageSupport integrated
Tim Englich <tim.englich@intevation.de>
parents:
116
diff
changeset
|
290 CallContext cc = createCallContext(); |
171
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
291 |
222
3e82b4f1c455
Removed some Compilation-Errors according to API-Changes in the ArtifactDatabase.
Tim Englich <tim.englich@intevation.de>
parents:
219
diff
changeset
|
292 Document describeDocument = this.readDocument("src/test/ressources/verticalprofile/verticalprofile_describe.xml"); |
326
37847d724fc9
Added one more Transitionstep to each Testcase according to the refactored Transitionmodel.
Tim Englich <tim.englich@intevation.de>
parents:
319
diff
changeset
|
293 int steps = 6; |
241
8500529d82af
Added ODV-Export to VerticalProfiles
Tim Englich <tim.englich@intevation.de>
parents:
240
diff
changeset
|
294 |
8500529d82af
Added ODV-Export to VerticalProfiles
Tim Englich <tim.englich@intevation.de>
parents:
240
diff
changeset
|
295 for (int i = 1; i <= steps; i++){ |
8500529d82af
Added ODV-Export to VerticalProfiles
Tim Englich <tim.englich@intevation.de>
parents:
240
diff
changeset
|
296 this.doNextStep( |
171
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
297 artifact, |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
298 cc, |
241
8500529d82af
Added ODV-Export to VerticalProfiles
Tim Englich <tim.englich@intevation.de>
parents:
240
diff
changeset
|
299 "src/test/ressources/verticalprofile/" + |
8500529d82af
Added ODV-Export to VerticalProfiles
Tim Englich <tim.englich@intevation.de>
parents:
240
diff
changeset
|
300 "verticalprofile_step_0"+i+"_feed.xml", |
8500529d82af
Added ODV-Export to VerticalProfiles
Tim Englich <tim.englich@intevation.de>
parents:
240
diff
changeset
|
301 "src/test/ressources/verticalprofile/" + |
8500529d82af
Added ODV-Export to VerticalProfiles
Tim Englich <tim.englich@intevation.de>
parents:
240
diff
changeset
|
302 "verticalprofile_step_0"+i+"_advance.xml", |
8500529d82af
Added ODV-Export to VerticalProfiles
Tim Englich <tim.englich@intevation.de>
parents:
240
diff
changeset
|
303 describeDocument); |
8500529d82af
Added ODV-Export to VerticalProfiles
Tim Englich <tim.englich@intevation.de>
parents:
240
diff
changeset
|
304 } |
171
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
305 |
107
4ebf9ad2e7eb
Added TestCase for TimeSeriesMesh
Tim Englich <tim.englich@intevation.de>
parents:
106
diff
changeset
|
306 // Vierter Schritt |
222
3e82b4f1c455
Removed some Compilation-Errors according to API-Changes in the ArtifactDatabase.
Tim Englich <tim.englich@intevation.de>
parents:
219
diff
changeset
|
307 Document outputData = artifact.describe(describeDocument,cc); |
106
10d9a440f52e
ExceptionTest for Responsdocuments added.
Tim Englich <tim.englich@intevation.de>
parents:
105
diff
changeset
|
308 FileOutputStream fos = null; |
10d9a440f52e
ExceptionTest for Responsdocuments added.
Tim Englich <tim.englich@intevation.de>
parents:
105
diff
changeset
|
309 FileOutputStream fos2 = null; |
10d9a440f52e
ExceptionTest for Responsdocuments added.
Tim Englich <tim.englich@intevation.de>
parents:
105
diff
changeset
|
310 FileOutputStream fos3 = null; |
241
8500529d82af
Added ODV-Export to VerticalProfiles
Tim Englich <tim.englich@intevation.de>
parents:
240
diff
changeset
|
311 FileOutputStream fos4 = null; |
171
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
312 try { |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
313 fos = new FileOutputStream("src/test/results/verticalprofile" |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
314 + System.currentTimeMillis() |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
315 + ".png"); |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
316 fos2 = new FileOutputStream("src/test/results/verticalprofile" |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
317 + System.currentTimeMillis() |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
318 + ".xml"); |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
319 fos3 = new FileOutputStream("src/test/results/verticalprofile" |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
320 + System.currentTimeMillis() |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
321 + ".csv"); |
241
8500529d82af
Added ODV-Export to VerticalProfiles
Tim Englich <tim.englich@intevation.de>
parents:
240
diff
changeset
|
322 fos4 = new FileOutputStream("src/test/results/verticalprofile" |
8500529d82af
Added ODV-Export to VerticalProfiles
Tim Englich <tim.englich@intevation.de>
parents:
240
diff
changeset
|
323 + System.currentTimeMillis() |
8500529d82af
Added ODV-Export to VerticalProfiles
Tim Englich <tim.englich@intevation.de>
parents:
240
diff
changeset
|
324 + ".odv"); |
8500529d82af
Added ODV-Export to VerticalProfiles
Tim Englich <tim.englich@intevation.de>
parents:
240
diff
changeset
|
325 artifact.out(this.readDocument("src/test/ressources/" + |
8500529d82af
Added ODV-Export to VerticalProfiles
Tim Englich <tim.englich@intevation.de>
parents:
240
diff
changeset
|
326 "verticalprofile/" + |
8500529d82af
Added ODV-Export to VerticalProfiles
Tim Englich <tim.englich@intevation.de>
parents:
240
diff
changeset
|
327 "verticalprofile_step_06_out_statistics.xml"), |
8500529d82af
Added ODV-Export to VerticalProfiles
Tim Englich <tim.englich@intevation.de>
parents:
240
diff
changeset
|
328 fos2, cc); |
8500529d82af
Added ODV-Export to VerticalProfiles
Tim Englich <tim.englich@intevation.de>
parents:
240
diff
changeset
|
329 artifact.out(this.readDocument("src/test/ressources/" + |
8500529d82af
Added ODV-Export to VerticalProfiles
Tim Englich <tim.englich@intevation.de>
parents:
240
diff
changeset
|
330 "verticalprofile/" + |
8500529d82af
Added ODV-Export to VerticalProfiles
Tim Englich <tim.englich@intevation.de>
parents:
240
diff
changeset
|
331 "verticalprofile_step_06_out_chart.xml"), |
8500529d82af
Added ODV-Export to VerticalProfiles
Tim Englich <tim.englich@intevation.de>
parents:
240
diff
changeset
|
332 fos, cc); |
8500529d82af
Added ODV-Export to VerticalProfiles
Tim Englich <tim.englich@intevation.de>
parents:
240
diff
changeset
|
333 artifact.out(this.readDocument("src/test/ressources/" + |
8500529d82af
Added ODV-Export to VerticalProfiles
Tim Englich <tim.englich@intevation.de>
parents:
240
diff
changeset
|
334 "verticalprofile/" + |
8500529d82af
Added ODV-Export to VerticalProfiles
Tim Englich <tim.englich@intevation.de>
parents:
240
diff
changeset
|
335 "verticalprofile_step_06_out_csv.xml"), |
8500529d82af
Added ODV-Export to VerticalProfiles
Tim Englich <tim.englich@intevation.de>
parents:
240
diff
changeset
|
336 fos3, cc); |
8500529d82af
Added ODV-Export to VerticalProfiles
Tim Englich <tim.englich@intevation.de>
parents:
240
diff
changeset
|
337 artifact.out(this.readDocument("src/test/ressources/" + |
8500529d82af
Added ODV-Export to VerticalProfiles
Tim Englich <tim.englich@intevation.de>
parents:
240
diff
changeset
|
338 "verticalprofile/" + |
8500529d82af
Added ODV-Export to VerticalProfiles
Tim Englich <tim.englich@intevation.de>
parents:
240
diff
changeset
|
339 "verticalprofile_step_06_out_odv.xml"), |
8500529d82af
Added ODV-Export to VerticalProfiles
Tim Englich <tim.englich@intevation.de>
parents:
240
diff
changeset
|
340 fos4, cc); |
171
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
341 } catch (Exception e) { |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
342 log.error(e, e); |
106
10d9a440f52e
ExceptionTest for Responsdocuments added.
Tim Englich <tim.englich@intevation.de>
parents:
105
diff
changeset
|
343 fail(); |
171
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
344 } finally { |
106
10d9a440f52e
ExceptionTest for Responsdocuments added.
Tim Englich <tim.englich@intevation.de>
parents:
105
diff
changeset
|
345 try { |
10d9a440f52e
ExceptionTest for Responsdocuments added.
Tim Englich <tim.englich@intevation.de>
parents:
105
diff
changeset
|
346 fos.flush(); |
10d9a440f52e
ExceptionTest for Responsdocuments added.
Tim Englich <tim.englich@intevation.de>
parents:
105
diff
changeset
|
347 fos.close(); |
10d9a440f52e
ExceptionTest for Responsdocuments added.
Tim Englich <tim.englich@intevation.de>
parents:
105
diff
changeset
|
348 fos2.flush(); |
10d9a440f52e
ExceptionTest for Responsdocuments added.
Tim Englich <tim.englich@intevation.de>
parents:
105
diff
changeset
|
349 fos2.close(); |
10d9a440f52e
ExceptionTest for Responsdocuments added.
Tim Englich <tim.englich@intevation.de>
parents:
105
diff
changeset
|
350 fos3.flush(); |
10d9a440f52e
ExceptionTest for Responsdocuments added.
Tim Englich <tim.englich@intevation.de>
parents:
105
diff
changeset
|
351 fos3.close(); |
241
8500529d82af
Added ODV-Export to VerticalProfiles
Tim Englich <tim.englich@intevation.de>
parents:
240
diff
changeset
|
352 fos4.flush(); |
8500529d82af
Added ODV-Export to VerticalProfiles
Tim Englich <tim.englich@intevation.de>
parents:
240
diff
changeset
|
353 fos4.close(); |
106
10d9a440f52e
ExceptionTest for Responsdocuments added.
Tim Englich <tim.englich@intevation.de>
parents:
105
diff
changeset
|
354 } catch (Exception e) { |
171
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
355 log.error(e, e); |
106
10d9a440f52e
ExceptionTest for Responsdocuments added.
Tim Englich <tim.englich@intevation.de>
parents:
105
diff
changeset
|
356 } |
10d9a440f52e
ExceptionTest for Responsdocuments added.
Tim Englich <tim.englich@intevation.de>
parents:
105
diff
changeset
|
357 } |
10d9a440f52e
ExceptionTest for Responsdocuments added.
Tim Englich <tim.englich@intevation.de>
parents:
105
diff
changeset
|
358 } catch (Exception e) { |
171
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
359 log.error(e, e); |
103
4042844339ee
Testcases for VerticalProfile and VerticalProfile Instantaneouspoint added
Tim Englich <tim.englich@intevation.de>
parents:
102
diff
changeset
|
360 fail(); |
4042844339ee
Testcases for VerticalProfile and VerticalProfile Instantaneouspoint added
Tim Englich <tim.englich@intevation.de>
parents:
102
diff
changeset
|
361 } |
4042844339ee
Testcases for VerticalProfile and VerticalProfile Instantaneouspoint added
Tim Englich <tim.englich@intevation.de>
parents:
102
diff
changeset
|
362 } |
171
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
363 |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
364 public void testVerticalProfileMeshArtifact() { |
114
d8d38a4dd965
Added TestCase for HorizontalProfiles of InstataneousPoints and the required Configuration
Tim Englich <tim.englich@intevation.de>
parents:
111
diff
changeset
|
365 try { |
171
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
366 log.debug("GNVArtifactsTestCase.testVerticalProfileArtifact"); |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
367 String artefactName = "fis_modeldata"; |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
368 ArtifactFactory artifactFactory = this |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
369 .getArtifactFactory(artefactName); |
114
d8d38a4dd965
Added TestCase for HorizontalProfiles of InstataneousPoints and the required Configuration
Tim Englich <tim.englich@intevation.de>
parents:
111
diff
changeset
|
370 assertNotNull(artifactFactory); |
d8d38a4dd965
Added TestCase for HorizontalProfiles of InstataneousPoints and the required Configuration
Tim Englich <tim.englich@intevation.de>
parents:
111
diff
changeset
|
371 log.debug("VerticalProfile-ArtifactFactory is available"); |
171
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
372 Artifact artifact = artifactFactory.createArtifact( |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
373 "" + System.currentTimeMillis(), bootstrap.getContext()); |
114
d8d38a4dd965
Added TestCase for HorizontalProfiles of InstataneousPoints and the required Configuration
Tim Englich <tim.englich@intevation.de>
parents:
111
diff
changeset
|
374 assertNotNull(artifact); |
d8d38a4dd965
Added TestCase for HorizontalProfiles of InstataneousPoints and the required Configuration
Tim Englich <tim.englich@intevation.de>
parents:
111
diff
changeset
|
375 log.debug("VerticalProfile-Artifact is available"); |
171
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
376 |
117
ef157bd2fa92
LanguageSupport integrated
Tim Englich <tim.englich@intevation.de>
parents:
116
diff
changeset
|
377 CallContext cc = createCallContext(); |
241
8500529d82af
Added ODV-Export to VerticalProfiles
Tim Englich <tim.englich@intevation.de>
parents:
240
diff
changeset
|
378 Document describeDocument = this.readDocument("src/test/ressources/" + |
8500529d82af
Added ODV-Export to VerticalProfiles
Tim Englich <tim.englich@intevation.de>
parents:
240
diff
changeset
|
379 "verticalprofile_mesh/" + |
8500529d82af
Added ODV-Export to VerticalProfiles
Tim Englich <tim.englich@intevation.de>
parents:
240
diff
changeset
|
380 "verticalprofile_describe.xml"); |
8500529d82af
Added ODV-Export to VerticalProfiles
Tim Englich <tim.englich@intevation.de>
parents:
240
diff
changeset
|
381 |
326
37847d724fc9
Added one more Transitionstep to each Testcase according to the refactored Transitionmodel.
Tim Englich <tim.englich@intevation.de>
parents:
319
diff
changeset
|
382 int steps = 10; |
241
8500529d82af
Added ODV-Export to VerticalProfiles
Tim Englich <tim.englich@intevation.de>
parents:
240
diff
changeset
|
383 |
8500529d82af
Added ODV-Export to VerticalProfiles
Tim Englich <tim.englich@intevation.de>
parents:
240
diff
changeset
|
384 for (int i = 1; i <= steps; i++){ |
326
37847d724fc9
Added one more Transitionstep to each Testcase according to the refactored Transitionmodel.
Tim Englich <tim.englich@intevation.de>
parents:
319
diff
changeset
|
385 String number = ""+i; |
37847d724fc9
Added one more Transitionstep to each Testcase according to the refactored Transitionmodel.
Tim Englich <tim.englich@intevation.de>
parents:
319
diff
changeset
|
386 if (i < 10){ |
37847d724fc9
Added one more Transitionstep to each Testcase according to the refactored Transitionmodel.
Tim Englich <tim.englich@intevation.de>
parents:
319
diff
changeset
|
387 number = "0"+number; |
37847d724fc9
Added one more Transitionstep to each Testcase according to the refactored Transitionmodel.
Tim Englich <tim.englich@intevation.de>
parents:
319
diff
changeset
|
388 } |
241
8500529d82af
Added ODV-Export to VerticalProfiles
Tim Englich <tim.englich@intevation.de>
parents:
240
diff
changeset
|
389 this.doNextStep( |
171
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
390 artifact, |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
391 cc, |
241
8500529d82af
Added ODV-Export to VerticalProfiles
Tim Englich <tim.englich@intevation.de>
parents:
240
diff
changeset
|
392 "src/test/ressources/verticalprofile_mesh/" + |
326
37847d724fc9
Added one more Transitionstep to each Testcase according to the refactored Transitionmodel.
Tim Englich <tim.englich@intevation.de>
parents:
319
diff
changeset
|
393 "verticalprofile_step_"+number+"_feed.xml", |
241
8500529d82af
Added ODV-Export to VerticalProfiles
Tim Englich <tim.englich@intevation.de>
parents:
240
diff
changeset
|
394 "src/test/ressources/verticalprofile_mesh/" + |
326
37847d724fc9
Added one more Transitionstep to each Testcase according to the refactored Transitionmodel.
Tim Englich <tim.englich@intevation.de>
parents:
319
diff
changeset
|
395 "verticalprofile_step_"+number+"_advance.xml", |
241
8500529d82af
Added ODV-Export to VerticalProfiles
Tim Englich <tim.englich@intevation.de>
parents:
240
diff
changeset
|
396 describeDocument); |
8500529d82af
Added ODV-Export to VerticalProfiles
Tim Englich <tim.englich@intevation.de>
parents:
240
diff
changeset
|
397 } |
229
a610c0a01afc
Added the Region-Filter to the Workflow of the Artifacttescases to be able to test it automatically.
Tim Englich <tim.englich@intevation.de>
parents:
222
diff
changeset
|
398 // 10. Schritt |
222
3e82b4f1c455
Removed some Compilation-Errors according to API-Changes in the ArtifactDatabase.
Tim Englich <tim.englich@intevation.de>
parents:
219
diff
changeset
|
399 Document outputData = artifact.describe(describeDocument,cc); |
114
d8d38a4dd965
Added TestCase for HorizontalProfiles of InstataneousPoints and the required Configuration
Tim Englich <tim.englich@intevation.de>
parents:
111
diff
changeset
|
400 FileOutputStream fos = null; |
d8d38a4dd965
Added TestCase for HorizontalProfiles of InstataneousPoints and the required Configuration
Tim Englich <tim.englich@intevation.de>
parents:
111
diff
changeset
|
401 FileOutputStream fos2 = null; |
d8d38a4dd965
Added TestCase for HorizontalProfiles of InstataneousPoints and the required Configuration
Tim Englich <tim.englich@intevation.de>
parents:
111
diff
changeset
|
402 FileOutputStream fos3 = null; |
241
8500529d82af
Added ODV-Export to VerticalProfiles
Tim Englich <tim.englich@intevation.de>
parents:
240
diff
changeset
|
403 FileOutputStream fos4 = null; |
171
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
404 try { |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
405 fos = new FileOutputStream( |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
406 "src/test/results/verticalprofile_mesh" |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
407 + System.currentTimeMillis() + ".png"); |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
408 fos2 = new FileOutputStream( |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
409 "src/test/results/verticalprofile_mesh" |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
410 + System.currentTimeMillis() + ".xml"); |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
411 fos3 = new FileOutputStream( |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
412 "src/test/results/verticalprofile_mesh" |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
413 + System.currentTimeMillis() + ".csv"); |
241
8500529d82af
Added ODV-Export to VerticalProfiles
Tim Englich <tim.englich@intevation.de>
parents:
240
diff
changeset
|
414 fos4 = new FileOutputStream( |
8500529d82af
Added ODV-Export to VerticalProfiles
Tim Englich <tim.englich@intevation.de>
parents:
240
diff
changeset
|
415 "src/test/results/verticalprofile_mesh" |
8500529d82af
Added ODV-Export to VerticalProfiles
Tim Englich <tim.englich@intevation.de>
parents:
240
diff
changeset
|
416 + System.currentTimeMillis() + ".odv"); |
8500529d82af
Added ODV-Export to VerticalProfiles
Tim Englich <tim.englich@intevation.de>
parents:
240
diff
changeset
|
417 artifact.out(this.readDocument("src/test/ressources/" + |
8500529d82af
Added ODV-Export to VerticalProfiles
Tim Englich <tim.englich@intevation.de>
parents:
240
diff
changeset
|
418 "verticalprofile_mesh/" + |
8500529d82af
Added ODV-Export to VerticalProfiles
Tim Englich <tim.englich@intevation.de>
parents:
240
diff
changeset
|
419 "verticalprofile_step_10_out_statistics.xml"), |
8500529d82af
Added ODV-Export to VerticalProfiles
Tim Englich <tim.englich@intevation.de>
parents:
240
diff
changeset
|
420 fos2, cc); |
8500529d82af
Added ODV-Export to VerticalProfiles
Tim Englich <tim.englich@intevation.de>
parents:
240
diff
changeset
|
421 artifact.out(this.readDocument("src/test/ressources/" + |
8500529d82af
Added ODV-Export to VerticalProfiles
Tim Englich <tim.englich@intevation.de>
parents:
240
diff
changeset
|
422 "verticalprofile_mesh/" + |
8500529d82af
Added ODV-Export to VerticalProfiles
Tim Englich <tim.englich@intevation.de>
parents:
240
diff
changeset
|
423 "verticalprofile_step_10_out_chart.xml"), |
8500529d82af
Added ODV-Export to VerticalProfiles
Tim Englich <tim.englich@intevation.de>
parents:
240
diff
changeset
|
424 fos, cc); |
8500529d82af
Added ODV-Export to VerticalProfiles
Tim Englich <tim.englich@intevation.de>
parents:
240
diff
changeset
|
425 artifact.out(this.readDocument("src/test/ressources/" + |
8500529d82af
Added ODV-Export to VerticalProfiles
Tim Englich <tim.englich@intevation.de>
parents:
240
diff
changeset
|
426 "verticalprofile_mesh/" + |
8500529d82af
Added ODV-Export to VerticalProfiles
Tim Englich <tim.englich@intevation.de>
parents:
240
diff
changeset
|
427 "verticalprofile_step_10_out_csv.xml"), |
8500529d82af
Added ODV-Export to VerticalProfiles
Tim Englich <tim.englich@intevation.de>
parents:
240
diff
changeset
|
428 fos3, cc); |
8500529d82af
Added ODV-Export to VerticalProfiles
Tim Englich <tim.englich@intevation.de>
parents:
240
diff
changeset
|
429 artifact.out(this.readDocument("src/test/ressources/" + |
8500529d82af
Added ODV-Export to VerticalProfiles
Tim Englich <tim.englich@intevation.de>
parents:
240
diff
changeset
|
430 "verticalprofile_mesh/" + |
8500529d82af
Added ODV-Export to VerticalProfiles
Tim Englich <tim.englich@intevation.de>
parents:
240
diff
changeset
|
431 "verticalprofile_step_10_out_odv.xml"), |
8500529d82af
Added ODV-Export to VerticalProfiles
Tim Englich <tim.englich@intevation.de>
parents:
240
diff
changeset
|
432 fos4, cc); |
171
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
433 } catch (Exception e) { |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
434 log.error(e, e); |
114
d8d38a4dd965
Added TestCase for HorizontalProfiles of InstataneousPoints and the required Configuration
Tim Englich <tim.englich@intevation.de>
parents:
111
diff
changeset
|
435 fail(); |
171
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
436 } finally { |
114
d8d38a4dd965
Added TestCase for HorizontalProfiles of InstataneousPoints and the required Configuration
Tim Englich <tim.englich@intevation.de>
parents:
111
diff
changeset
|
437 try { |
d8d38a4dd965
Added TestCase for HorizontalProfiles of InstataneousPoints and the required Configuration
Tim Englich <tim.englich@intevation.de>
parents:
111
diff
changeset
|
438 fos.flush(); |
d8d38a4dd965
Added TestCase for HorizontalProfiles of InstataneousPoints and the required Configuration
Tim Englich <tim.englich@intevation.de>
parents:
111
diff
changeset
|
439 fos.close(); |
d8d38a4dd965
Added TestCase for HorizontalProfiles of InstataneousPoints and the required Configuration
Tim Englich <tim.englich@intevation.de>
parents:
111
diff
changeset
|
440 fos2.flush(); |
d8d38a4dd965
Added TestCase for HorizontalProfiles of InstataneousPoints and the required Configuration
Tim Englich <tim.englich@intevation.de>
parents:
111
diff
changeset
|
441 fos2.close(); |
d8d38a4dd965
Added TestCase for HorizontalProfiles of InstataneousPoints and the required Configuration
Tim Englich <tim.englich@intevation.de>
parents:
111
diff
changeset
|
442 fos3.flush(); |
d8d38a4dd965
Added TestCase for HorizontalProfiles of InstataneousPoints and the required Configuration
Tim Englich <tim.englich@intevation.de>
parents:
111
diff
changeset
|
443 fos3.close(); |
241
8500529d82af
Added ODV-Export to VerticalProfiles
Tim Englich <tim.englich@intevation.de>
parents:
240
diff
changeset
|
444 fos4.flush(); |
8500529d82af
Added ODV-Export to VerticalProfiles
Tim Englich <tim.englich@intevation.de>
parents:
240
diff
changeset
|
445 fos4.close(); |
114
d8d38a4dd965
Added TestCase for HorizontalProfiles of InstataneousPoints and the required Configuration
Tim Englich <tim.englich@intevation.de>
parents:
111
diff
changeset
|
446 } catch (Exception e) { |
171
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
447 log.error(e, e); |
114
d8d38a4dd965
Added TestCase for HorizontalProfiles of InstataneousPoints and the required Configuration
Tim Englich <tim.englich@intevation.de>
parents:
111
diff
changeset
|
448 } |
d8d38a4dd965
Added TestCase for HorizontalProfiles of InstataneousPoints and the required Configuration
Tim Englich <tim.englich@intevation.de>
parents:
111
diff
changeset
|
449 } |
d8d38a4dd965
Added TestCase for HorizontalProfiles of InstataneousPoints and the required Configuration
Tim Englich <tim.englich@intevation.de>
parents:
111
diff
changeset
|
450 } catch (Exception e) { |
171
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
451 log.error(e, e); |
114
d8d38a4dd965
Added TestCase for HorizontalProfiles of InstataneousPoints and the required Configuration
Tim Englich <tim.englich@intevation.de>
parents:
111
diff
changeset
|
452 fail(); |
d8d38a4dd965
Added TestCase for HorizontalProfiles of InstataneousPoints and the required Configuration
Tim Englich <tim.englich@intevation.de>
parents:
111
diff
changeset
|
453 } |
d8d38a4dd965
Added TestCase for HorizontalProfiles of InstataneousPoints and the required Configuration
Tim Englich <tim.englich@intevation.de>
parents:
111
diff
changeset
|
454 } |
171
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
455 |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
456 public void testVerticalProfileInstantaneousPointArtifact() { |
116
820238357bab
Added Horizontal-Profile-Support for Meshes.
Tim Englich <tim.englich@intevation.de>
parents:
114
diff
changeset
|
457 try { |
171
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
458 log.debug("GNVArtifactsTestCase.testVerticalProfileArtifact"); |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
459 String artefactName = "fis_bsh_ctd"; |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
460 ArtifactFactory artifactFactory = this |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
461 .getArtifactFactory(artefactName); |
116
820238357bab
Added Horizontal-Profile-Support for Meshes.
Tim Englich <tim.englich@intevation.de>
parents:
114
diff
changeset
|
462 assertNotNull(artifactFactory); |
820238357bab
Added Horizontal-Profile-Support for Meshes.
Tim Englich <tim.englich@intevation.de>
parents:
114
diff
changeset
|
463 log.debug("VerticalProfile-ArtifactFactory is available"); |
171
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
464 Artifact artifact = artifactFactory.createArtifact( |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
465 "" + System.currentTimeMillis(), bootstrap.getContext()); |
116
820238357bab
Added Horizontal-Profile-Support for Meshes.
Tim Englich <tim.englich@intevation.de>
parents:
114
diff
changeset
|
466 assertNotNull(artifact); |
820238357bab
Added Horizontal-Profile-Support for Meshes.
Tim Englich <tim.englich@intevation.de>
parents:
114
diff
changeset
|
467 log.debug("VerticalProfile-Artifact is available"); |
171
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
468 |
117
ef157bd2fa92
LanguageSupport integrated
Tim Englich <tim.englich@intevation.de>
parents:
116
diff
changeset
|
469 CallContext cc = createCallContext(); |
222
3e82b4f1c455
Removed some Compilation-Errors according to API-Changes in the ArtifactDatabase.
Tim Englich <tim.englich@intevation.de>
parents:
219
diff
changeset
|
470 Document describeDocument = this.readDocument("src/test/ressources/verticalprofile_instantaneouspoint/verticalprofile_describe.xml"); |
243
b599de3db552
Added ODV-Export to VerticalProfiles in InstantaneousPoint
Tim Englich <tim.englich@intevation.de>
parents:
242
diff
changeset
|
471 |
326
37847d724fc9
Added one more Transitionstep to each Testcase according to the refactored Transitionmodel.
Tim Englich <tim.englich@intevation.de>
parents:
319
diff
changeset
|
472 int steps = 5; |
243
b599de3db552
Added ODV-Export to VerticalProfiles in InstantaneousPoint
Tim Englich <tim.englich@intevation.de>
parents:
242
diff
changeset
|
473 |
b599de3db552
Added ODV-Export to VerticalProfiles in InstantaneousPoint
Tim Englich <tim.englich@intevation.de>
parents:
242
diff
changeset
|
474 for (int i = 1; i <= steps; i++){ |
b599de3db552
Added ODV-Export to VerticalProfiles in InstantaneousPoint
Tim Englich <tim.englich@intevation.de>
parents:
242
diff
changeset
|
475 this.doNextStep( |
171
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
476 artifact, |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
477 cc, |
243
b599de3db552
Added ODV-Export to VerticalProfiles in InstantaneousPoint
Tim Englich <tim.englich@intevation.de>
parents:
242
diff
changeset
|
478 "src/test/ressources/verticalprofile_instantaneouspoint/" + |
b599de3db552
Added ODV-Export to VerticalProfiles in InstantaneousPoint
Tim Englich <tim.englich@intevation.de>
parents:
242
diff
changeset
|
479 "verticalprofile_step_0"+i+"_feed.xml", |
b599de3db552
Added ODV-Export to VerticalProfiles in InstantaneousPoint
Tim Englich <tim.englich@intevation.de>
parents:
242
diff
changeset
|
480 "src/test/ressources/verticalprofile_instantaneouspoint/" + |
b599de3db552
Added ODV-Export to VerticalProfiles in InstantaneousPoint
Tim Englich <tim.englich@intevation.de>
parents:
242
diff
changeset
|
481 "verticalprofile_step_0"+i+"_advance.xml", |
b599de3db552
Added ODV-Export to VerticalProfiles in InstantaneousPoint
Tim Englich <tim.englich@intevation.de>
parents:
242
diff
changeset
|
482 describeDocument); |
b599de3db552
Added ODV-Export to VerticalProfiles in InstantaneousPoint
Tim Englich <tim.englich@intevation.de>
parents:
242
diff
changeset
|
483 } |
171
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
484 |
116
820238357bab
Added Horizontal-Profile-Support for Meshes.
Tim Englich <tim.englich@intevation.de>
parents:
114
diff
changeset
|
485 // Vierter Schritt |
222
3e82b4f1c455
Removed some Compilation-Errors according to API-Changes in the ArtifactDatabase.
Tim Englich <tim.englich@intevation.de>
parents:
219
diff
changeset
|
486 Document outputData = artifact.describe(describeDocument,cc); |
116
820238357bab
Added Horizontal-Profile-Support for Meshes.
Tim Englich <tim.englich@intevation.de>
parents:
114
diff
changeset
|
487 FileOutputStream fos = null; |
820238357bab
Added Horizontal-Profile-Support for Meshes.
Tim Englich <tim.englich@intevation.de>
parents:
114
diff
changeset
|
488 FileOutputStream fos2 = null; |
820238357bab
Added Horizontal-Profile-Support for Meshes.
Tim Englich <tim.englich@intevation.de>
parents:
114
diff
changeset
|
489 FileOutputStream fos3 = null; |
243
b599de3db552
Added ODV-Export to VerticalProfiles in InstantaneousPoint
Tim Englich <tim.englich@intevation.de>
parents:
242
diff
changeset
|
490 FileOutputStream fos4 = null; |
171
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
491 try { |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
492 fos = new FileOutputStream( |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
493 "src/test/results/verticalprofile_instantaneouspoint" |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
494 + System.currentTimeMillis() + ".png"); |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
495 fos2 = new FileOutputStream( |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
496 "src/test/results/verticalprofile_instantaneouspoint" |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
497 + System.currentTimeMillis() + ".xml"); |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
498 fos3 = new FileOutputStream( |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
499 "src/test/results/verticalprofile_instantaneouspoint" |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
500 + System.currentTimeMillis() + ".csv"); |
243
b599de3db552
Added ODV-Export to VerticalProfiles in InstantaneousPoint
Tim Englich <tim.englich@intevation.de>
parents:
242
diff
changeset
|
501 fos4 = new FileOutputStream( |
b599de3db552
Added ODV-Export to VerticalProfiles in InstantaneousPoint
Tim Englich <tim.englich@intevation.de>
parents:
242
diff
changeset
|
502 "src/test/results/verticalprofile_instantaneouspoint" |
b599de3db552
Added ODV-Export to VerticalProfiles in InstantaneousPoint
Tim Englich <tim.englich@intevation.de>
parents:
242
diff
changeset
|
503 + System.currentTimeMillis() + ".odv"); |
b599de3db552
Added ODV-Export to VerticalProfiles in InstantaneousPoint
Tim Englich <tim.englich@intevation.de>
parents:
242
diff
changeset
|
504 artifact.out(this.readDocument("src/test/ressources/" + |
b599de3db552
Added ODV-Export to VerticalProfiles in InstantaneousPoint
Tim Englich <tim.englich@intevation.de>
parents:
242
diff
changeset
|
505 "verticalprofile_instantaneouspoint/" + |
b599de3db552
Added ODV-Export to VerticalProfiles in InstantaneousPoint
Tim Englich <tim.englich@intevation.de>
parents:
242
diff
changeset
|
506 "verticalprofile_step_05_out_statistics.xml"), |
b599de3db552
Added ODV-Export to VerticalProfiles in InstantaneousPoint
Tim Englich <tim.englich@intevation.de>
parents:
242
diff
changeset
|
507 fos2, cc); |
b599de3db552
Added ODV-Export to VerticalProfiles in InstantaneousPoint
Tim Englich <tim.englich@intevation.de>
parents:
242
diff
changeset
|
508 artifact.out(this.readDocument("src/test/ressources/" + |
b599de3db552
Added ODV-Export to VerticalProfiles in InstantaneousPoint
Tim Englich <tim.englich@intevation.de>
parents:
242
diff
changeset
|
509 "verticalprofile_instantaneouspoint/" + |
b599de3db552
Added ODV-Export to VerticalProfiles in InstantaneousPoint
Tim Englich <tim.englich@intevation.de>
parents:
242
diff
changeset
|
510 "verticalprofile_step_05_out_chart.xml"), |
b599de3db552
Added ODV-Export to VerticalProfiles in InstantaneousPoint
Tim Englich <tim.englich@intevation.de>
parents:
242
diff
changeset
|
511 fos, cc); |
b599de3db552
Added ODV-Export to VerticalProfiles in InstantaneousPoint
Tim Englich <tim.englich@intevation.de>
parents:
242
diff
changeset
|
512 artifact.out(this.readDocument("src/test/ressources/" + |
b599de3db552
Added ODV-Export to VerticalProfiles in InstantaneousPoint
Tim Englich <tim.englich@intevation.de>
parents:
242
diff
changeset
|
513 "verticalprofile_instantaneouspoint/" + |
b599de3db552
Added ODV-Export to VerticalProfiles in InstantaneousPoint
Tim Englich <tim.englich@intevation.de>
parents:
242
diff
changeset
|
514 "verticalprofile_step_05_out_csv.xml"), |
b599de3db552
Added ODV-Export to VerticalProfiles in InstantaneousPoint
Tim Englich <tim.englich@intevation.de>
parents:
242
diff
changeset
|
515 fos3, cc); |
b599de3db552
Added ODV-Export to VerticalProfiles in InstantaneousPoint
Tim Englich <tim.englich@intevation.de>
parents:
242
diff
changeset
|
516 artifact.out(this.readDocument("src/test/ressources/" + |
b599de3db552
Added ODV-Export to VerticalProfiles in InstantaneousPoint
Tim Englich <tim.englich@intevation.de>
parents:
242
diff
changeset
|
517 "verticalprofile_instantaneouspoint/" + |
b599de3db552
Added ODV-Export to VerticalProfiles in InstantaneousPoint
Tim Englich <tim.englich@intevation.de>
parents:
242
diff
changeset
|
518 "verticalprofile_step_05_out_odv.xml"), |
b599de3db552
Added ODV-Export to VerticalProfiles in InstantaneousPoint
Tim Englich <tim.englich@intevation.de>
parents:
242
diff
changeset
|
519 fos4, cc); |
171
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
520 } catch (Exception e) { |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
521 log.error(e, e); |
116
820238357bab
Added Horizontal-Profile-Support for Meshes.
Tim Englich <tim.englich@intevation.de>
parents:
114
diff
changeset
|
522 fail(); |
171
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
523 } finally { |
116
820238357bab
Added Horizontal-Profile-Support for Meshes.
Tim Englich <tim.englich@intevation.de>
parents:
114
diff
changeset
|
524 try { |
820238357bab
Added Horizontal-Profile-Support for Meshes.
Tim Englich <tim.englich@intevation.de>
parents:
114
diff
changeset
|
525 fos.flush(); |
820238357bab
Added Horizontal-Profile-Support for Meshes.
Tim Englich <tim.englich@intevation.de>
parents:
114
diff
changeset
|
526 fos.close(); |
820238357bab
Added Horizontal-Profile-Support for Meshes.
Tim Englich <tim.englich@intevation.de>
parents:
114
diff
changeset
|
527 fos2.flush(); |
820238357bab
Added Horizontal-Profile-Support for Meshes.
Tim Englich <tim.englich@intevation.de>
parents:
114
diff
changeset
|
528 fos2.close(); |
820238357bab
Added Horizontal-Profile-Support for Meshes.
Tim Englich <tim.englich@intevation.de>
parents:
114
diff
changeset
|
529 fos3.flush(); |
820238357bab
Added Horizontal-Profile-Support for Meshes.
Tim Englich <tim.englich@intevation.de>
parents:
114
diff
changeset
|
530 fos3.close(); |
820238357bab
Added Horizontal-Profile-Support for Meshes.
Tim Englich <tim.englich@intevation.de>
parents:
114
diff
changeset
|
531 } catch (Exception e) { |
171
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
532 log.error(e, e); |
116
820238357bab
Added Horizontal-Profile-Support for Meshes.
Tim Englich <tim.englich@intevation.de>
parents:
114
diff
changeset
|
533 } |
820238357bab
Added Horizontal-Profile-Support for Meshes.
Tim Englich <tim.englich@intevation.de>
parents:
114
diff
changeset
|
534 } |
820238357bab
Added Horizontal-Profile-Support for Meshes.
Tim Englich <tim.englich@intevation.de>
parents:
114
diff
changeset
|
535 } catch (Exception e) { |
171
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
536 log.error(e, e); |
116
820238357bab
Added Horizontal-Profile-Support for Meshes.
Tim Englich <tim.englich@intevation.de>
parents:
114
diff
changeset
|
537 fail(); |
820238357bab
Added Horizontal-Profile-Support for Meshes.
Tim Englich <tim.englich@intevation.de>
parents:
114
diff
changeset
|
538 } |
820238357bab
Added Horizontal-Profile-Support for Meshes.
Tim Englich <tim.englich@intevation.de>
parents:
114
diff
changeset
|
539 } |
171
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
540 |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
541 public void testHorizontalProfileInstantaneousPointArtifact() { |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
542 try { |
244
9048bc4b17cd
Added ODV-Export to HorizontalProfiles on InstantaneousPoint
Tim Englich <tim.englich@intevation.de>
parents:
243
diff
changeset
|
543 log.debug("GNVArtifactsTestCase." + |
9048bc4b17cd
Added ODV-Export to HorizontalProfiles on InstantaneousPoint
Tim Englich <tim.englich@intevation.de>
parents:
243
diff
changeset
|
544 "testHorizontalProfileInstantaneousPointArtifact"); |
171
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
545 String artefactName = "fis_delphin"; |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
546 ArtifactFactory artifactFactory = this |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
547 .getArtifactFactory(artefactName); |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
548 assertNotNull(artifactFactory); |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
549 log.debug("VerticalProfile-ArtifactFactory is available"); |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
550 Artifact artifact = artifactFactory.createArtifact( |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
551 "" + System.currentTimeMillis(), bootstrap.getContext()); |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
552 assertNotNull(artifact); |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
553 log.debug("VerticalProfile-Artifact is available"); |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
554 |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
555 CallContext cc = createCallContext(); |
222
3e82b4f1c455
Removed some Compilation-Errors according to API-Changes in the ArtifactDatabase.
Tim Englich <tim.englich@intevation.de>
parents:
219
diff
changeset
|
556 Document describeDocument = this.readDocument("src/test/ressources/horizontalProfile_instantaneouspoint/horizontalprofile_describe.xml"); |
244
9048bc4b17cd
Added ODV-Export to HorizontalProfiles on InstantaneousPoint
Tim Englich <tim.englich@intevation.de>
parents:
243
diff
changeset
|
557 |
326
37847d724fc9
Added one more Transitionstep to each Testcase according to the refactored Transitionmodel.
Tim Englich <tim.englich@intevation.de>
parents:
319
diff
changeset
|
558 int steps = 9; |
244
9048bc4b17cd
Added ODV-Export to HorizontalProfiles on InstantaneousPoint
Tim Englich <tim.englich@intevation.de>
parents:
243
diff
changeset
|
559 |
9048bc4b17cd
Added ODV-Export to HorizontalProfiles on InstantaneousPoint
Tim Englich <tim.englich@intevation.de>
parents:
243
diff
changeset
|
560 for (int i = 0; i < steps; i++){ |
9048bc4b17cd
Added ODV-Export to HorizontalProfiles on InstantaneousPoint
Tim Englich <tim.englich@intevation.de>
parents:
243
diff
changeset
|
561 |
9048bc4b17cd
Added ODV-Export to HorizontalProfiles on InstantaneousPoint
Tim Englich <tim.englich@intevation.de>
parents:
243
diff
changeset
|
562 this.doNextStep( |
171
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
563 artifact, |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
564 cc, |
244
9048bc4b17cd
Added ODV-Export to HorizontalProfiles on InstantaneousPoint
Tim Englich <tim.englich@intevation.de>
parents:
243
diff
changeset
|
565 "src/test/ressources/horizontalProfile_instantaneouspoint/" + |
9048bc4b17cd
Added ODV-Export to HorizontalProfiles on InstantaneousPoint
Tim Englich <tim.englich@intevation.de>
parents:
243
diff
changeset
|
566 "horizontalprofile_step_0"+i+"_feed.xml", |
9048bc4b17cd
Added ODV-Export to HorizontalProfiles on InstantaneousPoint
Tim Englich <tim.englich@intevation.de>
parents:
243
diff
changeset
|
567 "src/test/ressources/horizontalProfile_instantaneouspoint/" + |
9048bc4b17cd
Added ODV-Export to HorizontalProfiles on InstantaneousPoint
Tim Englich <tim.englich@intevation.de>
parents:
243
diff
changeset
|
568 "horizontalprofile_step_0"+i+"_advance.xml", |
9048bc4b17cd
Added ODV-Export to HorizontalProfiles on InstantaneousPoint
Tim Englich <tim.englich@intevation.de>
parents:
243
diff
changeset
|
569 describeDocument); |
9048bc4b17cd
Added ODV-Export to HorizontalProfiles on InstantaneousPoint
Tim Englich <tim.englich@intevation.de>
parents:
243
diff
changeset
|
570 } |
171
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
571 |
222
3e82b4f1c455
Removed some Compilation-Errors according to API-Changes in the ArtifactDatabase.
Tim Englich <tim.englich@intevation.de>
parents:
219
diff
changeset
|
572 Document outputData = artifact.describe(describeDocument, cc); |
171
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
573 FileOutputStream fos = null; |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
574 FileOutputStream fos2 = null; |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
575 FileOutputStream fos3 = null; |
244
9048bc4b17cd
Added ODV-Export to HorizontalProfiles on InstantaneousPoint
Tim Englich <tim.englich@intevation.de>
parents:
243
diff
changeset
|
576 FileOutputStream fos4 = null; |
171
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
577 try { |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
578 fos = new FileOutputStream( |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
579 "src/test/results/horizontalprofile_instantaneouspoint" |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
580 + System.currentTimeMillis() + ".png"); |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
581 fos2 = new FileOutputStream( |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
582 "src/test/results/horizontalprofile_instantaneouspoint" |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
583 + System.currentTimeMillis() + ".xml"); |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
584 fos3 = new FileOutputStream( |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
585 "src/test/results/horizontalprofile_instantaneouspoint" |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
586 + System.currentTimeMillis() + ".csv"); |
244
9048bc4b17cd
Added ODV-Export to HorizontalProfiles on InstantaneousPoint
Tim Englich <tim.englich@intevation.de>
parents:
243
diff
changeset
|
587 fos4 = new FileOutputStream( |
9048bc4b17cd
Added ODV-Export to HorizontalProfiles on InstantaneousPoint
Tim Englich <tim.englich@intevation.de>
parents:
243
diff
changeset
|
588 "src/test/results/horizontalprofile_instantaneouspoint" |
9048bc4b17cd
Added ODV-Export to HorizontalProfiles on InstantaneousPoint
Tim Englich <tim.englich@intevation.de>
parents:
243
diff
changeset
|
589 + System.currentTimeMillis() + ".odv"); |
9048bc4b17cd
Added ODV-Export to HorizontalProfiles on InstantaneousPoint
Tim Englich <tim.englich@intevation.de>
parents:
243
diff
changeset
|
590 artifact.out(this.readDocument("src/test/ressources/" + |
9048bc4b17cd
Added ODV-Export to HorizontalProfiles on InstantaneousPoint
Tim Englich <tim.englich@intevation.de>
parents:
243
diff
changeset
|
591 "horizontalProfile_instantaneouspoint/" + |
319
251f16a083f8
Added RegionFilter-Support to HorizontalProfile InstantaneousPoint
Tim Englich <tim.englich@intevation.de>
parents:
256
diff
changeset
|
592 "horizontalprofile_step_08_out_statistics.xml"), |
244
9048bc4b17cd
Added ODV-Export to HorizontalProfiles on InstantaneousPoint
Tim Englich <tim.englich@intevation.de>
parents:
243
diff
changeset
|
593 fos2,cc); |
9048bc4b17cd
Added ODV-Export to HorizontalProfiles on InstantaneousPoint
Tim Englich <tim.englich@intevation.de>
parents:
243
diff
changeset
|
594 artifact.out(this.readDocument("src/test/ressources/" + |
9048bc4b17cd
Added ODV-Export to HorizontalProfiles on InstantaneousPoint
Tim Englich <tim.englich@intevation.de>
parents:
243
diff
changeset
|
595 "horizontalProfile_instantaneouspoint/" + |
319
251f16a083f8
Added RegionFilter-Support to HorizontalProfile InstantaneousPoint
Tim Englich <tim.englich@intevation.de>
parents:
256
diff
changeset
|
596 "horizontalprofile_step_08_out_chart.xml"), |
244
9048bc4b17cd
Added ODV-Export to HorizontalProfiles on InstantaneousPoint
Tim Englich <tim.englich@intevation.de>
parents:
243
diff
changeset
|
597 fos,cc); |
9048bc4b17cd
Added ODV-Export to HorizontalProfiles on InstantaneousPoint
Tim Englich <tim.englich@intevation.de>
parents:
243
diff
changeset
|
598 artifact.out(this.readDocument("src/test/ressources/" + |
9048bc4b17cd
Added ODV-Export to HorizontalProfiles on InstantaneousPoint
Tim Englich <tim.englich@intevation.de>
parents:
243
diff
changeset
|
599 "horizontalProfile_instantaneouspoint/" + |
319
251f16a083f8
Added RegionFilter-Support to HorizontalProfile InstantaneousPoint
Tim Englich <tim.englich@intevation.de>
parents:
256
diff
changeset
|
600 "horizontalprofile_step_08_out_csv.xml"), |
244
9048bc4b17cd
Added ODV-Export to HorizontalProfiles on InstantaneousPoint
Tim Englich <tim.englich@intevation.de>
parents:
243
diff
changeset
|
601 fos3,cc); |
9048bc4b17cd
Added ODV-Export to HorizontalProfiles on InstantaneousPoint
Tim Englich <tim.englich@intevation.de>
parents:
243
diff
changeset
|
602 artifact.out(this.readDocument("src/test/ressources/" + |
9048bc4b17cd
Added ODV-Export to HorizontalProfiles on InstantaneousPoint
Tim Englich <tim.englich@intevation.de>
parents:
243
diff
changeset
|
603 "horizontalProfile_instantaneouspoint/" + |
319
251f16a083f8
Added RegionFilter-Support to HorizontalProfile InstantaneousPoint
Tim Englich <tim.englich@intevation.de>
parents:
256
diff
changeset
|
604 "horizontalprofile_step_08_out_odv.xml"), |
244
9048bc4b17cd
Added ODV-Export to HorizontalProfiles on InstantaneousPoint
Tim Englich <tim.englich@intevation.de>
parents:
243
diff
changeset
|
605 fos4,cc); |
171
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
606 } catch (Exception e) { |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
607 log.error(e, e); |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
608 fail(); |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
609 } finally { |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
610 try { |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
611 fos.flush(); |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
612 fos.close(); |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
613 fos2.flush(); |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
614 fos2.close(); |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
615 fos3.flush(); |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
616 fos3.close(); |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
617 } catch (Exception e) { |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
618 log.error(e, e); |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
619 } |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
620 } |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
621 } catch (Exception e) { |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
622 log.error(e, e); |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
623 fail(); |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
624 } |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
625 } |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
626 |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
627 public void testHorizontalProfileMeshPointArtifact() { |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
628 try { |
242
5925739d25ac
Added ODV-Export to HorizontalProfiles in Meshes
Tim Englich <tim.englich@intevation.de>
parents:
241
diff
changeset
|
629 log.debug("GNVArtifactsTestCase." + |
5925739d25ac
Added ODV-Export to HorizontalProfiles in Meshes
Tim Englich <tim.englich@intevation.de>
parents:
241
diff
changeset
|
630 "testHorizontalProfileInstantaneousPointArtifact"); |
171
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
631 String artefactName = "fis_modeldata"; |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
632 ArtifactFactory artifactFactory = this |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
633 .getArtifactFactory(artefactName); |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
634 assertNotNull(artifactFactory); |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
635 log.debug("VerticalProfile-ArtifactFactory is available"); |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
636 Artifact artifact = artifactFactory.createArtifact( |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
637 "" + System.currentTimeMillis(), bootstrap.getContext()); |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
638 assertNotNull(artifact); |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
639 log.debug("VerticalProfile-Artifact is available"); |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
640 |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
641 CallContext cc = createCallContext(); |
222
3e82b4f1c455
Removed some Compilation-Errors according to API-Changes in the ArtifactDatabase.
Tim Englich <tim.englich@intevation.de>
parents:
219
diff
changeset
|
642 Document describeDocument = this.readDocument("src/test/ressources/horizontalProfile_mesh/horizontalprofile_describe.xml"); |
242
5925739d25ac
Added ODV-Export to HorizontalProfiles in Meshes
Tim Englich <tim.englich@intevation.de>
parents:
241
diff
changeset
|
643 |
326
37847d724fc9
Added one more Transitionstep to each Testcase according to the refactored Transitionmodel.
Tim Englich <tim.englich@intevation.de>
parents:
319
diff
changeset
|
644 int steps = 10; |
242
5925739d25ac
Added ODV-Export to HorizontalProfiles in Meshes
Tim Englich <tim.englich@intevation.de>
parents:
241
diff
changeset
|
645 |
5925739d25ac
Added ODV-Export to HorizontalProfiles in Meshes
Tim Englich <tim.englich@intevation.de>
parents:
241
diff
changeset
|
646 for (int i = 1; i <= steps; i++){ |
326
37847d724fc9
Added one more Transitionstep to each Testcase according to the refactored Transitionmodel.
Tim Englich <tim.englich@intevation.de>
parents:
319
diff
changeset
|
647 String number = ""+i; |
37847d724fc9
Added one more Transitionstep to each Testcase according to the refactored Transitionmodel.
Tim Englich <tim.englich@intevation.de>
parents:
319
diff
changeset
|
648 if (i < 10){ |
37847d724fc9
Added one more Transitionstep to each Testcase according to the refactored Transitionmodel.
Tim Englich <tim.englich@intevation.de>
parents:
319
diff
changeset
|
649 number = "0"+number; |
37847d724fc9
Added one more Transitionstep to each Testcase according to the refactored Transitionmodel.
Tim Englich <tim.englich@intevation.de>
parents:
319
diff
changeset
|
650 } |
242
5925739d25ac
Added ODV-Export to HorizontalProfiles in Meshes
Tim Englich <tim.englich@intevation.de>
parents:
241
diff
changeset
|
651 this.doNextStep( |
171
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
652 artifact, |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
653 cc, |
242
5925739d25ac
Added ODV-Export to HorizontalProfiles in Meshes
Tim Englich <tim.englich@intevation.de>
parents:
241
diff
changeset
|
654 "src/test/ressources/horizontalProfile_mesh/" + |
326
37847d724fc9
Added one more Transitionstep to each Testcase according to the refactored Transitionmodel.
Tim Englich <tim.englich@intevation.de>
parents:
319
diff
changeset
|
655 "horizontalprofile_step_"+number+"_feed.xml", |
242
5925739d25ac
Added ODV-Export to HorizontalProfiles in Meshes
Tim Englich <tim.englich@intevation.de>
parents:
241
diff
changeset
|
656 "src/test/ressources/horizontalProfile_mesh/" + |
326
37847d724fc9
Added one more Transitionstep to each Testcase according to the refactored Transitionmodel.
Tim Englich <tim.englich@intevation.de>
parents:
319
diff
changeset
|
657 "horizontalprofile_step_"+number+"_advance.xml", |
242
5925739d25ac
Added ODV-Export to HorizontalProfiles in Meshes
Tim Englich <tim.englich@intevation.de>
parents:
241
diff
changeset
|
658 describeDocument); |
5925739d25ac
Added ODV-Export to HorizontalProfiles in Meshes
Tim Englich <tim.englich@intevation.de>
parents:
241
diff
changeset
|
659 } |
229
a610c0a01afc
Added the Region-Filter to the Workflow of the Artifacttescases to be able to test it automatically.
Tim Englich <tim.englich@intevation.de>
parents:
222
diff
changeset
|
660 |
222
3e82b4f1c455
Removed some Compilation-Errors according to API-Changes in the ArtifactDatabase.
Tim Englich <tim.englich@intevation.de>
parents:
219
diff
changeset
|
661 Document outputData = artifact.describe(describeDocument,cc); |
171
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
662 FileOutputStream fos = null; |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
663 FileOutputStream fos2 = null; |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
664 FileOutputStream fos3 = null; |
242
5925739d25ac
Added ODV-Export to HorizontalProfiles in Meshes
Tim Englich <tim.englich@intevation.de>
parents:
241
diff
changeset
|
665 FileOutputStream fos4 = null; |
171
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
666 try { |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
667 fos = new FileOutputStream( |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
668 "src/test/results/horizontalProfile_mesh" |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
669 + System.currentTimeMillis() + ".png"); |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
670 fos2 = new FileOutputStream( |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
671 "src/test/results/horizontalProfile_mesh" |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
672 + System.currentTimeMillis() + ".xml"); |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
673 fos3 = new FileOutputStream( |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
674 "src/test/results/horizontalProfile_mesh" |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
675 + System.currentTimeMillis() + ".csv"); |
242
5925739d25ac
Added ODV-Export to HorizontalProfiles in Meshes
Tim Englich <tim.englich@intevation.de>
parents:
241
diff
changeset
|
676 fos4 = new FileOutputStream( |
5925739d25ac
Added ODV-Export to HorizontalProfiles in Meshes
Tim Englich <tim.englich@intevation.de>
parents:
241
diff
changeset
|
677 "src/test/results/horizontalProfile_mesh" |
5925739d25ac
Added ODV-Export to HorizontalProfiles in Meshes
Tim Englich <tim.englich@intevation.de>
parents:
241
diff
changeset
|
678 + System.currentTimeMillis() + ".odv"); |
5925739d25ac
Added ODV-Export to HorizontalProfiles in Meshes
Tim Englich <tim.englich@intevation.de>
parents:
241
diff
changeset
|
679 artifact.out(this.readDocument("src/test/ressources/" + |
5925739d25ac
Added ODV-Export to HorizontalProfiles in Meshes
Tim Englich <tim.englich@intevation.de>
parents:
241
diff
changeset
|
680 "horizontalProfile_mesh/" + |
5925739d25ac
Added ODV-Export to HorizontalProfiles in Meshes
Tim Englich <tim.englich@intevation.de>
parents:
241
diff
changeset
|
681 "horizontalprofile_step_10_out_statistics.xml"), |
5925739d25ac
Added ODV-Export to HorizontalProfiles in Meshes
Tim Englich <tim.englich@intevation.de>
parents:
241
diff
changeset
|
682 fos2, cc); |
5925739d25ac
Added ODV-Export to HorizontalProfiles in Meshes
Tim Englich <tim.englich@intevation.de>
parents:
241
diff
changeset
|
683 artifact.out(this.readDocument("src/test/ressources/" + |
5925739d25ac
Added ODV-Export to HorizontalProfiles in Meshes
Tim Englich <tim.englich@intevation.de>
parents:
241
diff
changeset
|
684 "horizontalProfile_mesh/" + |
5925739d25ac
Added ODV-Export to HorizontalProfiles in Meshes
Tim Englich <tim.englich@intevation.de>
parents:
241
diff
changeset
|
685 "horizontalprofile_step_10_out_chart.xml"), |
171
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
686 fos, cc); |
242
5925739d25ac
Added ODV-Export to HorizontalProfiles in Meshes
Tim Englich <tim.englich@intevation.de>
parents:
241
diff
changeset
|
687 artifact.out(this.readDocument("src/test/ressources/" + |
5925739d25ac
Added ODV-Export to HorizontalProfiles in Meshes
Tim Englich <tim.englich@intevation.de>
parents:
241
diff
changeset
|
688 "horizontalProfile_mesh/" + |
5925739d25ac
Added ODV-Export to HorizontalProfiles in Meshes
Tim Englich <tim.englich@intevation.de>
parents:
241
diff
changeset
|
689 "horizontalprofile_step_10_out_csv.xml"), |
5925739d25ac
Added ODV-Export to HorizontalProfiles in Meshes
Tim Englich <tim.englich@intevation.de>
parents:
241
diff
changeset
|
690 fos3, cc); |
5925739d25ac
Added ODV-Export to HorizontalProfiles in Meshes
Tim Englich <tim.englich@intevation.de>
parents:
241
diff
changeset
|
691 artifact.out(this.readDocument("src/test/ressources/" + |
5925739d25ac
Added ODV-Export to HorizontalProfiles in Meshes
Tim Englich <tim.englich@intevation.de>
parents:
241
diff
changeset
|
692 "horizontalProfile_mesh/" + |
5925739d25ac
Added ODV-Export to HorizontalProfiles in Meshes
Tim Englich <tim.englich@intevation.de>
parents:
241
diff
changeset
|
693 "horizontalprofile_step_10_out_odv.xml"), |
5925739d25ac
Added ODV-Export to HorizontalProfiles in Meshes
Tim Englich <tim.englich@intevation.de>
parents:
241
diff
changeset
|
694 fos4, cc); |
171
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
695 } catch (Exception e) { |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
696 log.error(e, e); |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
697 fail(); |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
698 } finally { |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
699 try { |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
700 fos.flush(); |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
701 fos.close(); |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
702 fos2.flush(); |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
703 fos2.close(); |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
704 fos3.flush(); |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
705 fos3.close(); |
242
5925739d25ac
Added ODV-Export to HorizontalProfiles in Meshes
Tim Englich <tim.englich@intevation.de>
parents:
241
diff
changeset
|
706 fos4.flush(); |
5925739d25ac
Added ODV-Export to HorizontalProfiles in Meshes
Tim Englich <tim.englich@intevation.de>
parents:
241
diff
changeset
|
707 fos4.close(); |
171
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
708 } catch (Exception e) { |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
709 log.error(e, e); |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
710 } |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
711 } |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
712 } catch (Exception e) { |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
713 log.error(e, e); |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
714 fail(); |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
715 } |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
716 } |
197
bab92ad1165d
Added the required Classes an Configuration for providing VerticalCrossSections
Tim Englich <tim.englich@intevation.de>
parents:
177
diff
changeset
|
717 |
219
f8cb64d5fe4f
Added the Testcase for Horizontal Cross-Sections
Tim Englich <tim.englich@intevation.de>
parents:
213
diff
changeset
|
718 public void testHorizontalCrossSectionMeshArtifact() { |
f8cb64d5fe4f
Added the Testcase for Horizontal Cross-Sections
Tim Englich <tim.englich@intevation.de>
parents:
213
diff
changeset
|
719 try { |
f8cb64d5fe4f
Added the Testcase for Horizontal Cross-Sections
Tim Englich <tim.englich@intevation.de>
parents:
213
diff
changeset
|
720 log.debug("GNVArtifactsTestCase.testHorizontalCrossSectionMeshArtifact"); |
f8cb64d5fe4f
Added the Testcase for Horizontal Cross-Sections
Tim Englich <tim.englich@intevation.de>
parents:
213
diff
changeset
|
721 String artefactName = "fis_modeldata"; |
f8cb64d5fe4f
Added the Testcase for Horizontal Cross-Sections
Tim Englich <tim.englich@intevation.de>
parents:
213
diff
changeset
|
722 ArtifactFactory artifactFactory = this |
f8cb64d5fe4f
Added the Testcase for Horizontal Cross-Sections
Tim Englich <tim.englich@intevation.de>
parents:
213
diff
changeset
|
723 .getArtifactFactory(artefactName); |
f8cb64d5fe4f
Added the Testcase for Horizontal Cross-Sections
Tim Englich <tim.englich@intevation.de>
parents:
213
diff
changeset
|
724 assertNotNull(artifactFactory); |
f8cb64d5fe4f
Added the Testcase for Horizontal Cross-Sections
Tim Englich <tim.englich@intevation.de>
parents:
213
diff
changeset
|
725 log.debug("HorizontalCrossSectionMesh-ArtifactFactory is available"); |
f8cb64d5fe4f
Added the Testcase for Horizontal Cross-Sections
Tim Englich <tim.englich@intevation.de>
parents:
213
diff
changeset
|
726 Artifact artifact = artifactFactory.createArtifact( |
f8cb64d5fe4f
Added the Testcase for Horizontal Cross-Sections
Tim Englich <tim.englich@intevation.de>
parents:
213
diff
changeset
|
727 "" + System.currentTimeMillis(), bootstrap.getContext()); |
f8cb64d5fe4f
Added the Testcase for Horizontal Cross-Sections
Tim Englich <tim.englich@intevation.de>
parents:
213
diff
changeset
|
728 assertNotNull(artifact); |
f8cb64d5fe4f
Added the Testcase for Horizontal Cross-Sections
Tim Englich <tim.englich@intevation.de>
parents:
213
diff
changeset
|
729 log.debug("HorizontalCrossSectionMesh-Artifact is available"); |
f8cb64d5fe4f
Added the Testcase for Horizontal Cross-Sections
Tim Englich <tim.englich@intevation.de>
parents:
213
diff
changeset
|
730 |
f8cb64d5fe4f
Added the Testcase for Horizontal Cross-Sections
Tim Englich <tim.englich@intevation.de>
parents:
213
diff
changeset
|
731 CallContext cc = createCallContext(); |
222
3e82b4f1c455
Removed some Compilation-Errors according to API-Changes in the ArtifactDatabase.
Tim Englich <tim.englich@intevation.de>
parents:
219
diff
changeset
|
732 Document describeDocument = this.readDocument("src/test/ressources/horizontalcrosssection_mesh/horizontalcrosssection_describe.xml"); |
326
37847d724fc9
Added one more Transitionstep to each Testcase according to the refactored Transitionmodel.
Tim Englich <tim.englich@intevation.de>
parents:
319
diff
changeset
|
733 int steps = 6; |
245
9697a6b8d2c9
Added ODV-Export to HorizontalCrossSection on Meshes
Tim Englich <tim.englich@intevation.de>
parents:
244
diff
changeset
|
734 |
9697a6b8d2c9
Added ODV-Export to HorizontalCrossSection on Meshes
Tim Englich <tim.englich@intevation.de>
parents:
244
diff
changeset
|
735 for (int i = 1; i <= steps; i++){ |
9697a6b8d2c9
Added ODV-Export to HorizontalCrossSection on Meshes
Tim Englich <tim.englich@intevation.de>
parents:
244
diff
changeset
|
736 this.doNextStep( |
219
f8cb64d5fe4f
Added the Testcase for Horizontal Cross-Sections
Tim Englich <tim.englich@intevation.de>
parents:
213
diff
changeset
|
737 artifact, |
f8cb64d5fe4f
Added the Testcase for Horizontal Cross-Sections
Tim Englich <tim.englich@intevation.de>
parents:
213
diff
changeset
|
738 cc, |
245
9697a6b8d2c9
Added ODV-Export to HorizontalCrossSection on Meshes
Tim Englich <tim.englich@intevation.de>
parents:
244
diff
changeset
|
739 "src/test/ressources/horizontalcrosssection_mesh/" + |
9697a6b8d2c9
Added ODV-Export to HorizontalCrossSection on Meshes
Tim Englich <tim.englich@intevation.de>
parents:
244
diff
changeset
|
740 "horizontalcrosssection_step_0"+i+"_feed.xml", |
9697a6b8d2c9
Added ODV-Export to HorizontalCrossSection on Meshes
Tim Englich <tim.englich@intevation.de>
parents:
244
diff
changeset
|
741 "src/test/ressources/horizontalcrosssection_mesh/" + |
9697a6b8d2c9
Added ODV-Export to HorizontalCrossSection on Meshes
Tim Englich <tim.englich@intevation.de>
parents:
244
diff
changeset
|
742 "horizontalcrosssection_step_0"+i+"_advance.xml", |
9697a6b8d2c9
Added ODV-Export to HorizontalCrossSection on Meshes
Tim Englich <tim.englich@intevation.de>
parents:
244
diff
changeset
|
743 describeDocument); |
9697a6b8d2c9
Added ODV-Export to HorizontalCrossSection on Meshes
Tim Englich <tim.englich@intevation.de>
parents:
244
diff
changeset
|
744 } |
219
f8cb64d5fe4f
Added the Testcase for Horizontal Cross-Sections
Tim Englich <tim.englich@intevation.de>
parents:
213
diff
changeset
|
745 |
222
3e82b4f1c455
Removed some Compilation-Errors according to API-Changes in the ArtifactDatabase.
Tim Englich <tim.englich@intevation.de>
parents:
219
diff
changeset
|
746 Document outputData = artifact.describe(describeDocument,cc); |
219
f8cb64d5fe4f
Added the Testcase for Horizontal Cross-Sections
Tim Englich <tim.englich@intevation.de>
parents:
213
diff
changeset
|
747 FileOutputStream fos = null; |
f8cb64d5fe4f
Added the Testcase for Horizontal Cross-Sections
Tim Englich <tim.englich@intevation.de>
parents:
213
diff
changeset
|
748 FileOutputStream fos2 = null; |
f8cb64d5fe4f
Added the Testcase for Horizontal Cross-Sections
Tim Englich <tim.englich@intevation.de>
parents:
213
diff
changeset
|
749 FileOutputStream fos3 = null; |
f8cb64d5fe4f
Added the Testcase for Horizontal Cross-Sections
Tim Englich <tim.englich@intevation.de>
parents:
213
diff
changeset
|
750 try { |
f8cb64d5fe4f
Added the Testcase for Horizontal Cross-Sections
Tim Englich <tim.englich@intevation.de>
parents:
213
diff
changeset
|
751 fos = new FileOutputStream( |
f8cb64d5fe4f
Added the Testcase for Horizontal Cross-Sections
Tim Englich <tim.englich@intevation.de>
parents:
213
diff
changeset
|
752 "src/test/results/horizontalcrosssection_mesh" |
f8cb64d5fe4f
Added the Testcase for Horizontal Cross-Sections
Tim Englich <tim.englich@intevation.de>
parents:
213
diff
changeset
|
753 + System.currentTimeMillis() + ".png"); |
256
008709f79611
Removed Statisticsupport for VerticalCrossSection and HorizontalCrossSection according to Requirement TG_0030.061
Tim Englich <tim.englich@intevation.de>
parents:
246
diff
changeset
|
754 |
219
f8cb64d5fe4f
Added the Testcase for Horizontal Cross-Sections
Tim Englich <tim.englich@intevation.de>
parents:
213
diff
changeset
|
755 fos2 = new FileOutputStream( |
f8cb64d5fe4f
Added the Testcase for Horizontal Cross-Sections
Tim Englich <tim.englich@intevation.de>
parents:
213
diff
changeset
|
756 "src/test/results/horizontalcrosssection_mesh" |
256
008709f79611
Removed Statisticsupport for VerticalCrossSection and HorizontalCrossSection according to Requirement TG_0030.061
Tim Englich <tim.englich@intevation.de>
parents:
246
diff
changeset
|
757 + System.currentTimeMillis() + ".csv"); |
219
f8cb64d5fe4f
Added the Testcase for Horizontal Cross-Sections
Tim Englich <tim.englich@intevation.de>
parents:
213
diff
changeset
|
758 fos3 = new FileOutputStream( |
f8cb64d5fe4f
Added the Testcase for Horizontal Cross-Sections
Tim Englich <tim.englich@intevation.de>
parents:
213
diff
changeset
|
759 "src/test/results/horizontalcrosssection_mesh" |
245
9697a6b8d2c9
Added ODV-Export to HorizontalCrossSection on Meshes
Tim Englich <tim.englich@intevation.de>
parents:
244
diff
changeset
|
760 + System.currentTimeMillis() + ".odv"); |
9697a6b8d2c9
Added ODV-Export to HorizontalCrossSection on Meshes
Tim Englich <tim.englich@intevation.de>
parents:
244
diff
changeset
|
761 artifact.out(this.readDocument("src/test/ressources/" + |
9697a6b8d2c9
Added ODV-Export to HorizontalCrossSection on Meshes
Tim Englich <tim.englich@intevation.de>
parents:
244
diff
changeset
|
762 "horizontalcrosssection_mesh/" + |
9697a6b8d2c9
Added ODV-Export to HorizontalCrossSection on Meshes
Tim Englich <tim.englich@intevation.de>
parents:
244
diff
changeset
|
763 "horizontalcrosssection_step_06_out_chart.xml"), |
219
f8cb64d5fe4f
Added the Testcase for Horizontal Cross-Sections
Tim Englich <tim.englich@intevation.de>
parents:
213
diff
changeset
|
764 fos, cc); |
245
9697a6b8d2c9
Added ODV-Export to HorizontalCrossSection on Meshes
Tim Englich <tim.englich@intevation.de>
parents:
244
diff
changeset
|
765 artifact.out(this.readDocument("src/test/ressources/" + |
9697a6b8d2c9
Added ODV-Export to HorizontalCrossSection on Meshes
Tim Englich <tim.englich@intevation.de>
parents:
244
diff
changeset
|
766 "horizontalcrosssection_mesh/" + |
9697a6b8d2c9
Added ODV-Export to HorizontalCrossSection on Meshes
Tim Englich <tim.englich@intevation.de>
parents:
244
diff
changeset
|
767 "horizontalcrosssection_step_06_out_csv.xml"), |
256
008709f79611
Removed Statisticsupport for VerticalCrossSection and HorizontalCrossSection according to Requirement TG_0030.061
Tim Englich <tim.englich@intevation.de>
parents:
246
diff
changeset
|
768 fos2,cc); |
245
9697a6b8d2c9
Added ODV-Export to HorizontalCrossSection on Meshes
Tim Englich <tim.englich@intevation.de>
parents:
244
diff
changeset
|
769 artifact.out(this.readDocument("src/test/ressources/" + |
9697a6b8d2c9
Added ODV-Export to HorizontalCrossSection on Meshes
Tim Englich <tim.englich@intevation.de>
parents:
244
diff
changeset
|
770 "horizontalcrosssection_mesh/" + |
9697a6b8d2c9
Added ODV-Export to HorizontalCrossSection on Meshes
Tim Englich <tim.englich@intevation.de>
parents:
244
diff
changeset
|
771 "horizontalcrosssection_step_06_out_odv.xml"), |
256
008709f79611
Removed Statisticsupport for VerticalCrossSection and HorizontalCrossSection according to Requirement TG_0030.061
Tim Englich <tim.englich@intevation.de>
parents:
246
diff
changeset
|
772 fos3,cc); |
219
f8cb64d5fe4f
Added the Testcase for Horizontal Cross-Sections
Tim Englich <tim.englich@intevation.de>
parents:
213
diff
changeset
|
773 } catch (Exception e) { |
f8cb64d5fe4f
Added the Testcase for Horizontal Cross-Sections
Tim Englich <tim.englich@intevation.de>
parents:
213
diff
changeset
|
774 log.error(e, e); |
f8cb64d5fe4f
Added the Testcase for Horizontal Cross-Sections
Tim Englich <tim.englich@intevation.de>
parents:
213
diff
changeset
|
775 fail(); |
f8cb64d5fe4f
Added the Testcase for Horizontal Cross-Sections
Tim Englich <tim.englich@intevation.de>
parents:
213
diff
changeset
|
776 } finally { |
f8cb64d5fe4f
Added the Testcase for Horizontal Cross-Sections
Tim Englich <tim.englich@intevation.de>
parents:
213
diff
changeset
|
777 try { |
f8cb64d5fe4f
Added the Testcase for Horizontal Cross-Sections
Tim Englich <tim.englich@intevation.de>
parents:
213
diff
changeset
|
778 fos.flush(); |
f8cb64d5fe4f
Added the Testcase for Horizontal Cross-Sections
Tim Englich <tim.englich@intevation.de>
parents:
213
diff
changeset
|
779 fos.close(); |
f8cb64d5fe4f
Added the Testcase for Horizontal Cross-Sections
Tim Englich <tim.englich@intevation.de>
parents:
213
diff
changeset
|
780 fos2.flush(); |
f8cb64d5fe4f
Added the Testcase for Horizontal Cross-Sections
Tim Englich <tim.englich@intevation.de>
parents:
213
diff
changeset
|
781 fos2.close(); |
f8cb64d5fe4f
Added the Testcase for Horizontal Cross-Sections
Tim Englich <tim.englich@intevation.de>
parents:
213
diff
changeset
|
782 fos3.flush(); |
f8cb64d5fe4f
Added the Testcase for Horizontal Cross-Sections
Tim Englich <tim.englich@intevation.de>
parents:
213
diff
changeset
|
783 fos3.close(); |
f8cb64d5fe4f
Added the Testcase for Horizontal Cross-Sections
Tim Englich <tim.englich@intevation.de>
parents:
213
diff
changeset
|
784 } catch (Exception e) { |
f8cb64d5fe4f
Added the Testcase for Horizontal Cross-Sections
Tim Englich <tim.englich@intevation.de>
parents:
213
diff
changeset
|
785 log.error(e, e); |
f8cb64d5fe4f
Added the Testcase for Horizontal Cross-Sections
Tim Englich <tim.englich@intevation.de>
parents:
213
diff
changeset
|
786 } |
f8cb64d5fe4f
Added the Testcase for Horizontal Cross-Sections
Tim Englich <tim.englich@intevation.de>
parents:
213
diff
changeset
|
787 } |
f8cb64d5fe4f
Added the Testcase for Horizontal Cross-Sections
Tim Englich <tim.englich@intevation.de>
parents:
213
diff
changeset
|
788 } catch (Exception e) { |
f8cb64d5fe4f
Added the Testcase for Horizontal Cross-Sections
Tim Englich <tim.englich@intevation.de>
parents:
213
diff
changeset
|
789 log.error(e, e); |
f8cb64d5fe4f
Added the Testcase for Horizontal Cross-Sections
Tim Englich <tim.englich@intevation.de>
parents:
213
diff
changeset
|
790 fail(); |
f8cb64d5fe4f
Added the Testcase for Horizontal Cross-Sections
Tim Englich <tim.englich@intevation.de>
parents:
213
diff
changeset
|
791 } |
f8cb64d5fe4f
Added the Testcase for Horizontal Cross-Sections
Tim Englich <tim.englich@intevation.de>
parents:
213
diff
changeset
|
792 } |
f8cb64d5fe4f
Added the Testcase for Horizontal Cross-Sections
Tim Englich <tim.englich@intevation.de>
parents:
213
diff
changeset
|
793 |
197
bab92ad1165d
Added the required Classes an Configuration for providing VerticalCrossSections
Tim Englich <tim.englich@intevation.de>
parents:
177
diff
changeset
|
794 public void testVerticalCrossSectionMeshArtifact() { |
bab92ad1165d
Added the required Classes an Configuration for providing VerticalCrossSections
Tim Englich <tim.englich@intevation.de>
parents:
177
diff
changeset
|
795 try { |
246
b7f69809239c
Added ODV-Export to VerticalCrossSection on Meshes
Tim Englich <tim.englich@intevation.de>
parents:
245
diff
changeset
|
796 log.debug("GNVArtifactsTestCase." + |
b7f69809239c
Added ODV-Export to VerticalCrossSection on Meshes
Tim Englich <tim.englich@intevation.de>
parents:
245
diff
changeset
|
797 "testHVerticalCrossSectionMeshArtifact"); |
197
bab92ad1165d
Added the required Classes an Configuration for providing VerticalCrossSections
Tim Englich <tim.englich@intevation.de>
parents:
177
diff
changeset
|
798 String artefactName = "fis_modeldata"; |
bab92ad1165d
Added the required Classes an Configuration for providing VerticalCrossSections
Tim Englich <tim.englich@intevation.de>
parents:
177
diff
changeset
|
799 ArtifactFactory artifactFactory = this |
bab92ad1165d
Added the required Classes an Configuration for providing VerticalCrossSections
Tim Englich <tim.englich@intevation.de>
parents:
177
diff
changeset
|
800 .getArtifactFactory(artefactName); |
bab92ad1165d
Added the required Classes an Configuration for providing VerticalCrossSections
Tim Englich <tim.englich@intevation.de>
parents:
177
diff
changeset
|
801 assertNotNull(artifactFactory); |
bab92ad1165d
Added the required Classes an Configuration for providing VerticalCrossSections
Tim Englich <tim.englich@intevation.de>
parents:
177
diff
changeset
|
802 log.debug("VerticalProfile-ArtifactFactory is available"); |
bab92ad1165d
Added the required Classes an Configuration for providing VerticalCrossSections
Tim Englich <tim.englich@intevation.de>
parents:
177
diff
changeset
|
803 Artifact artifact = artifactFactory.createArtifact( |
bab92ad1165d
Added the required Classes an Configuration for providing VerticalCrossSections
Tim Englich <tim.englich@intevation.de>
parents:
177
diff
changeset
|
804 "" + System.currentTimeMillis(), bootstrap.getContext()); |
bab92ad1165d
Added the required Classes an Configuration for providing VerticalCrossSections
Tim Englich <tim.englich@intevation.de>
parents:
177
diff
changeset
|
805 assertNotNull(artifact); |
bab92ad1165d
Added the required Classes an Configuration for providing VerticalCrossSections
Tim Englich <tim.englich@intevation.de>
parents:
177
diff
changeset
|
806 log.debug("VerticalProfile-Artifact is available"); |
bab92ad1165d
Added the required Classes an Configuration for providing VerticalCrossSections
Tim Englich <tim.englich@intevation.de>
parents:
177
diff
changeset
|
807 |
bab92ad1165d
Added the required Classes an Configuration for providing VerticalCrossSections
Tim Englich <tim.englich@intevation.de>
parents:
177
diff
changeset
|
808 CallContext cc = createCallContext(); |
222
3e82b4f1c455
Removed some Compilation-Errors according to API-Changes in the ArtifactDatabase.
Tim Englich <tim.englich@intevation.de>
parents:
219
diff
changeset
|
809 Document describeDocument = this.readDocument("src/test/ressources/verticalcrosssection_mesh/verticalcrosssection_describe.xml"); |
246
b7f69809239c
Added ODV-Export to VerticalCrossSection on Meshes
Tim Englich <tim.englich@intevation.de>
parents:
245
diff
changeset
|
810 |
326
37847d724fc9
Added one more Transitionstep to each Testcase according to the refactored Transitionmodel.
Tim Englich <tim.englich@intevation.de>
parents:
319
diff
changeset
|
811 int steps = 8; |
246
b7f69809239c
Added ODV-Export to VerticalCrossSection on Meshes
Tim Englich <tim.englich@intevation.de>
parents:
245
diff
changeset
|
812 |
b7f69809239c
Added ODV-Export to VerticalCrossSection on Meshes
Tim Englich <tim.englich@intevation.de>
parents:
245
diff
changeset
|
813 for (int i = 1; i <= steps; i++){ |
b7f69809239c
Added ODV-Export to VerticalCrossSection on Meshes
Tim Englich <tim.englich@intevation.de>
parents:
245
diff
changeset
|
814 |
b7f69809239c
Added ODV-Export to VerticalCrossSection on Meshes
Tim Englich <tim.englich@intevation.de>
parents:
245
diff
changeset
|
815 this.doNextStep( |
197
bab92ad1165d
Added the required Classes an Configuration for providing VerticalCrossSections
Tim Englich <tim.englich@intevation.de>
parents:
177
diff
changeset
|
816 artifact, |
bab92ad1165d
Added the required Classes an Configuration for providing VerticalCrossSections
Tim Englich <tim.englich@intevation.de>
parents:
177
diff
changeset
|
817 cc, |
246
b7f69809239c
Added ODV-Export to VerticalCrossSection on Meshes
Tim Englich <tim.englich@intevation.de>
parents:
245
diff
changeset
|
818 "src/test/ressources/verticalcrosssection_mesh/" + |
b7f69809239c
Added ODV-Export to VerticalCrossSection on Meshes
Tim Englich <tim.englich@intevation.de>
parents:
245
diff
changeset
|
819 "verticalcrosssection_step_0"+i+"_feed.xml", |
b7f69809239c
Added ODV-Export to VerticalCrossSection on Meshes
Tim Englich <tim.englich@intevation.de>
parents:
245
diff
changeset
|
820 "src/test/ressources/verticalcrosssection_mesh/" + |
b7f69809239c
Added ODV-Export to VerticalCrossSection on Meshes
Tim Englich <tim.englich@intevation.de>
parents:
245
diff
changeset
|
821 "verticalcrosssection_step_0"+i+"_advance.xml", |
b7f69809239c
Added ODV-Export to VerticalCrossSection on Meshes
Tim Englich <tim.englich@intevation.de>
parents:
245
diff
changeset
|
822 describeDocument); |
b7f69809239c
Added ODV-Export to VerticalCrossSection on Meshes
Tim Englich <tim.englich@intevation.de>
parents:
245
diff
changeset
|
823 } |
b7f69809239c
Added ODV-Export to VerticalCrossSection on Meshes
Tim Englich <tim.englich@intevation.de>
parents:
245
diff
changeset
|
824 |
222
3e82b4f1c455
Removed some Compilation-Errors according to API-Changes in the ArtifactDatabase.
Tim Englich <tim.englich@intevation.de>
parents:
219
diff
changeset
|
825 Document outputData = artifact.describe(describeDocument,cc); |
197
bab92ad1165d
Added the required Classes an Configuration for providing VerticalCrossSections
Tim Englich <tim.englich@intevation.de>
parents:
177
diff
changeset
|
826 FileOutputStream fos = null; |
bab92ad1165d
Added the required Classes an Configuration for providing VerticalCrossSections
Tim Englich <tim.englich@intevation.de>
parents:
177
diff
changeset
|
827 FileOutputStream fos2 = null; |
bab92ad1165d
Added the required Classes an Configuration for providing VerticalCrossSections
Tim Englich <tim.englich@intevation.de>
parents:
177
diff
changeset
|
828 FileOutputStream fos3 = null; |
bab92ad1165d
Added the required Classes an Configuration for providing VerticalCrossSections
Tim Englich <tim.englich@intevation.de>
parents:
177
diff
changeset
|
829 try { |
bab92ad1165d
Added the required Classes an Configuration for providing VerticalCrossSections
Tim Englich <tim.englich@intevation.de>
parents:
177
diff
changeset
|
830 fos = new FileOutputStream( |
bab92ad1165d
Added the required Classes an Configuration for providing VerticalCrossSections
Tim Englich <tim.englich@intevation.de>
parents:
177
diff
changeset
|
831 "src/test/results/verticalcrosssection_mesh" |
bab92ad1165d
Added the required Classes an Configuration for providing VerticalCrossSections
Tim Englich <tim.englich@intevation.de>
parents:
177
diff
changeset
|
832 + System.currentTimeMillis() + ".png"); |
256
008709f79611
Removed Statisticsupport for VerticalCrossSection and HorizontalCrossSection according to Requirement TG_0030.061
Tim Englich <tim.englich@intevation.de>
parents:
246
diff
changeset
|
833 |
197
bab92ad1165d
Added the required Classes an Configuration for providing VerticalCrossSections
Tim Englich <tim.englich@intevation.de>
parents:
177
diff
changeset
|
834 fos2 = new FileOutputStream( |
bab92ad1165d
Added the required Classes an Configuration for providing VerticalCrossSections
Tim Englich <tim.englich@intevation.de>
parents:
177
diff
changeset
|
835 "src/test/results/verticalcrosssection_mesh" |
256
008709f79611
Removed Statisticsupport for VerticalCrossSection and HorizontalCrossSection according to Requirement TG_0030.061
Tim Englich <tim.englich@intevation.de>
parents:
246
diff
changeset
|
836 + System.currentTimeMillis() + ".csv"); |
197
bab92ad1165d
Added the required Classes an Configuration for providing VerticalCrossSections
Tim Englich <tim.englich@intevation.de>
parents:
177
diff
changeset
|
837 fos3 = new FileOutputStream( |
bab92ad1165d
Added the required Classes an Configuration for providing VerticalCrossSections
Tim Englich <tim.englich@intevation.de>
parents:
177
diff
changeset
|
838 "src/test/results/verticalcrosssection_mesh" |
246
b7f69809239c
Added ODV-Export to VerticalCrossSection on Meshes
Tim Englich <tim.englich@intevation.de>
parents:
245
diff
changeset
|
839 + System.currentTimeMillis() + ".odv"); |
256
008709f79611
Removed Statisticsupport for VerticalCrossSection and HorizontalCrossSection according to Requirement TG_0030.061
Tim Englich <tim.englich@intevation.de>
parents:
246
diff
changeset
|
840 artifact.out(this.readDocument("src/test/ressources/" + |
246
b7f69809239c
Added ODV-Export to VerticalCrossSection on Meshes
Tim Englich <tim.englich@intevation.de>
parents:
245
diff
changeset
|
841 "verticalcrosssection_mesh/" + |
b7f69809239c
Added ODV-Export to VerticalCrossSection on Meshes
Tim Englich <tim.englich@intevation.de>
parents:
245
diff
changeset
|
842 "verticalcrosssection_step_08_out_chart.xml"), |
b7f69809239c
Added ODV-Export to VerticalCrossSection on Meshes
Tim Englich <tim.englich@intevation.de>
parents:
245
diff
changeset
|
843 fos, cc); |
b7f69809239c
Added ODV-Export to VerticalCrossSection on Meshes
Tim Englich <tim.englich@intevation.de>
parents:
245
diff
changeset
|
844 artifact.out(this.readDocument("src/test/ressources/" + |
b7f69809239c
Added ODV-Export to VerticalCrossSection on Meshes
Tim Englich <tim.englich@intevation.de>
parents:
245
diff
changeset
|
845 "verticalcrosssection_mesh/" + |
b7f69809239c
Added ODV-Export to VerticalCrossSection on Meshes
Tim Englich <tim.englich@intevation.de>
parents:
245
diff
changeset
|
846 "verticalcrosssection_step_08_out_csv.xml"), |
256
008709f79611
Removed Statisticsupport for VerticalCrossSection and HorizontalCrossSection according to Requirement TG_0030.061
Tim Englich <tim.englich@intevation.de>
parents:
246
diff
changeset
|
847 fos2,cc); |
246
b7f69809239c
Added ODV-Export to VerticalCrossSection on Meshes
Tim Englich <tim.englich@intevation.de>
parents:
245
diff
changeset
|
848 artifact.out(this.readDocument("src/test/ressources/" + |
b7f69809239c
Added ODV-Export to VerticalCrossSection on Meshes
Tim Englich <tim.englich@intevation.de>
parents:
245
diff
changeset
|
849 "verticalcrosssection_mesh/" + |
b7f69809239c
Added ODV-Export to VerticalCrossSection on Meshes
Tim Englich <tim.englich@intevation.de>
parents:
245
diff
changeset
|
850 "verticalcrosssection_step_08_out_odv.xml"), |
256
008709f79611
Removed Statisticsupport for VerticalCrossSection and HorizontalCrossSection according to Requirement TG_0030.061
Tim Englich <tim.englich@intevation.de>
parents:
246
diff
changeset
|
851 fos3,cc); |
246
b7f69809239c
Added ODV-Export to VerticalCrossSection on Meshes
Tim Englich <tim.englich@intevation.de>
parents:
245
diff
changeset
|
852 |
197
bab92ad1165d
Added the required Classes an Configuration for providing VerticalCrossSections
Tim Englich <tim.englich@intevation.de>
parents:
177
diff
changeset
|
853 } catch (Exception e) { |
bab92ad1165d
Added the required Classes an Configuration for providing VerticalCrossSections
Tim Englich <tim.englich@intevation.de>
parents:
177
diff
changeset
|
854 log.error(e, e); |
bab92ad1165d
Added the required Classes an Configuration for providing VerticalCrossSections
Tim Englich <tim.englich@intevation.de>
parents:
177
diff
changeset
|
855 fail(); |
bab92ad1165d
Added the required Classes an Configuration for providing VerticalCrossSections
Tim Englich <tim.englich@intevation.de>
parents:
177
diff
changeset
|
856 } finally { |
bab92ad1165d
Added the required Classes an Configuration for providing VerticalCrossSections
Tim Englich <tim.englich@intevation.de>
parents:
177
diff
changeset
|
857 try { |
bab92ad1165d
Added the required Classes an Configuration for providing VerticalCrossSections
Tim Englich <tim.englich@intevation.de>
parents:
177
diff
changeset
|
858 fos.flush(); |
bab92ad1165d
Added the required Classes an Configuration for providing VerticalCrossSections
Tim Englich <tim.englich@intevation.de>
parents:
177
diff
changeset
|
859 fos.close(); |
bab92ad1165d
Added the required Classes an Configuration for providing VerticalCrossSections
Tim Englich <tim.englich@intevation.de>
parents:
177
diff
changeset
|
860 fos2.flush(); |
bab92ad1165d
Added the required Classes an Configuration for providing VerticalCrossSections
Tim Englich <tim.englich@intevation.de>
parents:
177
diff
changeset
|
861 fos2.close(); |
bab92ad1165d
Added the required Classes an Configuration for providing VerticalCrossSections
Tim Englich <tim.englich@intevation.de>
parents:
177
diff
changeset
|
862 fos3.flush(); |
bab92ad1165d
Added the required Classes an Configuration for providing VerticalCrossSections
Tim Englich <tim.englich@intevation.de>
parents:
177
diff
changeset
|
863 fos3.close(); |
bab92ad1165d
Added the required Classes an Configuration for providing VerticalCrossSections
Tim Englich <tim.englich@intevation.de>
parents:
177
diff
changeset
|
864 } catch (Exception e) { |
bab92ad1165d
Added the required Classes an Configuration for providing VerticalCrossSections
Tim Englich <tim.englich@intevation.de>
parents:
177
diff
changeset
|
865 log.error(e, e); |
bab92ad1165d
Added the required Classes an Configuration for providing VerticalCrossSections
Tim Englich <tim.englich@intevation.de>
parents:
177
diff
changeset
|
866 } |
bab92ad1165d
Added the required Classes an Configuration for providing VerticalCrossSections
Tim Englich <tim.englich@intevation.de>
parents:
177
diff
changeset
|
867 } |
bab92ad1165d
Added the required Classes an Configuration for providing VerticalCrossSections
Tim Englich <tim.englich@intevation.de>
parents:
177
diff
changeset
|
868 } catch (Exception e) { |
bab92ad1165d
Added the required Classes an Configuration for providing VerticalCrossSections
Tim Englich <tim.englich@intevation.de>
parents:
177
diff
changeset
|
869 log.error(e, e); |
bab92ad1165d
Added the required Classes an Configuration for providing VerticalCrossSections
Tim Englich <tim.englich@intevation.de>
parents:
177
diff
changeset
|
870 fail(); |
bab92ad1165d
Added the required Classes an Configuration for providing VerticalCrossSections
Tim Englich <tim.englich@intevation.de>
parents:
177
diff
changeset
|
871 } |
bab92ad1165d
Added the required Classes an Configuration for providing VerticalCrossSections
Tim Englich <tim.englich@intevation.de>
parents:
177
diff
changeset
|
872 } |
171
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
873 |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
874 protected void createFile(byte[] content, String fileName) { |
52
4d6a82b96059
First Implementation of the GNV-Artifacts
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
875 try { |
69
f24c825144bc
TestCase Refactored to the new Folder-Based Configuration.
Tim Englich <tim.englich@intevation.de>
parents:
62
diff
changeset
|
876 FileOutputStream fos = new FileOutputStream(new File(fileName)); |
f24c825144bc
TestCase Refactored to the new Folder-Based Configuration.
Tim Englich <tim.englich@intevation.de>
parents:
62
diff
changeset
|
877 ByteArrayInputStream bis = new ByteArrayInputStream(content); |
f24c825144bc
TestCase Refactored to the new Folder-Based Configuration.
Tim Englich <tim.englich@intevation.de>
parents:
62
diff
changeset
|
878 byte[] buf = new byte[4096]; |
171
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
879 while (bis.read(buf) > 0) { |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
880 fos.write(buf); |
69
f24c825144bc
TestCase Refactored to the new Folder-Based Configuration.
Tim Englich <tim.englich@intevation.de>
parents:
62
diff
changeset
|
881 } |
f24c825144bc
TestCase Refactored to the new Folder-Based Configuration.
Tim Englich <tim.englich@intevation.de>
parents:
62
diff
changeset
|
882 fos.flush(); |
f24c825144bc
TestCase Refactored to the new Folder-Based Configuration.
Tim Englich <tim.englich@intevation.de>
parents:
62
diff
changeset
|
883 fos.close(); |
f24c825144bc
TestCase Refactored to the new Folder-Based Configuration.
Tim Englich <tim.englich@intevation.de>
parents:
62
diff
changeset
|
884 } catch (FileNotFoundException e) { |
171
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
885 log.error(e, e); |
69
f24c825144bc
TestCase Refactored to the new Folder-Based Configuration.
Tim Englich <tim.englich@intevation.de>
parents:
62
diff
changeset
|
886 } catch (IOException e) { |
171
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
887 log.error(e, e); |
52
4d6a82b96059
First Implementation of the GNV-Artifacts
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
888 } |
4d6a82b96059
First Implementation of the GNV-Artifacts
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
889 } |
4d6a82b96059
First Implementation of the GNV-Artifacts
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
890 |
4d6a82b96059
First Implementation of the GNV-Artifacts
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
891 /** |
4d6a82b96059
First Implementation of the GNV-Artifacts
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
892 * @param artefactName |
4d6a82b96059
First Implementation of the GNV-Artifacts
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
893 */ |
171
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
894 private ArtifactFactory getArtifactFactory(String artefactName) { |
52
4d6a82b96059
First Implementation of the GNV-Artifacts
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
895 log.debug("GNVArtifactsTestCase.getArtifactFactory"); |
4d6a82b96059
First Implementation of the GNV-Artifacts
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
896 ArtifactFactory[] artifactFactories = bootstrap.getArtifactFactories(); |
171
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
897 for (int i = 0; i < artifactFactories.length; i++) { |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
898 if (artifactFactories[i].getName().equals(artefactName)) { |
52
4d6a82b96059
First Implementation of the GNV-Artifacts
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
899 log.debug("ArtifactFactory wurde gefunden."); |
4d6a82b96059
First Implementation of the GNV-Artifacts
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
900 return artifactFactories[i]; |
4d6a82b96059
First Implementation of the GNV-Artifacts
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
901 } |
4d6a82b96059
First Implementation of the GNV-Artifacts
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
902 } |
4d6a82b96059
First Implementation of the GNV-Artifacts
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
903 return null; |
4d6a82b96059
First Implementation of the GNV-Artifacts
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
904 } |
171
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
905 |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
906 protected void writeDocument2Log(Document document) { |
72
1fece4da4f2f
TestCase moved from TimeSeriesArtifact to FISArtifact. Used FIS: Marnet
Tim Englich <tim.englich@intevation.de>
parents:
69
diff
changeset
|
907 log.debug(new ArtifactXMLUtilities().writeDocument2String(document)); |
54
09b4bf848c7b
2009-09-08 Tim Englich <tim.englich@intevation.de>
Tim Englich <tim.englich@intevation.de>
parents:
52
diff
changeset
|
908 } |
171
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
909 |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
910 protected Document readDocument(String fileName) { |
58
f31343d80d53
Artifact.advance initial implementiert
Tim Englich <tim.englich@intevation.de>
parents:
54
diff
changeset
|
911 Document returnValue = null; |
f31343d80d53
Artifact.advance initial implementiert
Tim Englich <tim.englich@intevation.de>
parents:
54
diff
changeset
|
912 try { |
171
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
913 DocumentBuilderFactory docBuilderFactory = DocumentBuilderFactory |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
914 .newInstance(); |
58
f31343d80d53
Artifact.advance initial implementiert
Tim Englich <tim.englich@intevation.de>
parents:
54
diff
changeset
|
915 DocumentBuilder docBuilder = docBuilderFactory.newDocumentBuilder(); |
171
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
916 returnValue = docBuilder.parse(new File(fileName)); |
58
f31343d80d53
Artifact.advance initial implementiert
Tim Englich <tim.englich@intevation.de>
parents:
54
diff
changeset
|
917 } catch (ParserConfigurationException e) { |
171
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
918 log.error(e, e); |
58
f31343d80d53
Artifact.advance initial implementiert
Tim Englich <tim.englich@intevation.de>
parents:
54
diff
changeset
|
919 } catch (SAXException e) { |
171
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
920 log.error(e, e); |
58
f31343d80d53
Artifact.advance initial implementiert
Tim Englich <tim.englich@intevation.de>
parents:
54
diff
changeset
|
921 } catch (IOException e) { |
171
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
922 log.error(e, e); |
58
f31343d80d53
Artifact.advance initial implementiert
Tim Englich <tim.englich@intevation.de>
parents:
54
diff
changeset
|
923 } |
f31343d80d53
Artifact.advance initial implementiert
Tim Englich <tim.englich@intevation.de>
parents:
54
diff
changeset
|
924 return returnValue; |
f31343d80d53
Artifact.advance initial implementiert
Tim Englich <tim.englich@intevation.de>
parents:
54
diff
changeset
|
925 } |
52
4d6a82b96059
First Implementation of the GNV-Artifacts
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
926 |
171
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
927 private void check4ExceptionReport(Document document) throws Exception { |
106
10d9a440f52e
ExceptionTest for Responsdocuments added.
Tim Englich <tim.englich@intevation.de>
parents:
105
diff
changeset
|
928 document = new ArtifactXMLUtilities().reInitDocument(document); |
171
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
929 String message = Config.getStringXPath(document, |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
930 "/exceptionreport/exception"); |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
931 if (message != null) { |
106
10d9a440f52e
ExceptionTest for Responsdocuments added.
Tim Englich <tim.englich@intevation.de>
parents:
105
diff
changeset
|
932 throw new Exception(message); |
10d9a440f52e
ExceptionTest for Responsdocuments added.
Tim Englich <tim.englich@intevation.de>
parents:
105
diff
changeset
|
933 } |
10d9a440f52e
ExceptionTest for Responsdocuments added.
Tim Englich <tim.englich@intevation.de>
parents:
105
diff
changeset
|
934 } |
244
9048bc4b17cd
Added ODV-Export to HorizontalProfiles on InstantaneousPoint
Tim Englich <tim.englich@intevation.de>
parents:
243
diff
changeset
|
935 } |