Mercurial > dive4elements > gnv-client
annotate gnv-artifacts/src/test/java/de/intevation/gnv/artifacts/GNVArtifactsTestCase.java @ 232:3d6d89bcbf42
Added special Data-Selection to the ODV-Exports of TimeSeries on TimeSeriesPoints. issue68
gnv-artifacts/trunk@300 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Tim Englich <tim.englich@intevation.de> |
---|---|
date | Mon, 09 Nov 2009 08:55:01 +0000 |
parents | a610c0a01afc |
children | 76897b73db4e |
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 |
3d6d89bcbf42
Added special Data-Selection to the ODV-Exports of TimeSeries on TimeSeriesPoints. issue68
Tim Englich <tim.englich@intevation.de>
parents:
229
diff
changeset
|
96 int steps = 5; |
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 |
3d6d89bcbf42
Added special Data-Selection to the ODV-Exports of TimeSeries on TimeSeriesPoints. issue68
Tim Englich <tim.englich@intevation.de>
parents:
229
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); |
171
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
108 |
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
|
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 |
3d6d89bcbf42
Added special Data-Selection to the ODV-Exports of TimeSeries on TimeSeriesPoints. issue68
Tim Englich <tim.englich@intevation.de>
parents:
229
diff
changeset
|
111 Document outputData = artifact.describe(describeDocument,cc); |
106
10d9a440f52e
ExceptionTest for Responsdocuments added.
Tim Englich <tim.englich@intevation.de>
parents:
105
diff
changeset
|
112 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
|
113 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
|
114 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
|
115 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
|
116 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
|
117 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
|
118 + 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
|
119 + ".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
|
120 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
|
121 + 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
|
122 + ".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
|
123 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
|
124 + 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
|
125 + ".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
|
126 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
|
127 + 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
|
128 + ".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
|
129 |
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 artifact.feed(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
|
131 .readDocument("src/test/ressources/timeseries/timeseries_step_06_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
|
132 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
|
133 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
|
134 .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
|
135 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
|
136 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
|
137 .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
|
138 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
|
139 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
|
140 .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
|
141 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
|
142 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
|
143 .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
|
144 fos4, cc); |
171
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
145 } catch (Exception e) { |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
146 log.error(e, e); |
106
10d9a440f52e
ExceptionTest for Responsdocuments added.
Tim Englich <tim.englich@intevation.de>
parents:
105
diff
changeset
|
147 fail(); |
171
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
148 } finally { |
106
10d9a440f52e
ExceptionTest for Responsdocuments added.
Tim Englich <tim.englich@intevation.de>
parents:
105
diff
changeset
|
149 try { |
10d9a440f52e
ExceptionTest for Responsdocuments added.
Tim Englich <tim.englich@intevation.de>
parents:
105
diff
changeset
|
150 fos.flush(); |
10d9a440f52e
ExceptionTest for Responsdocuments added.
Tim Englich <tim.englich@intevation.de>
parents:
105
diff
changeset
|
151 fos.close(); |
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); |
106
10d9a440f52e
ExceptionTest for Responsdocuments added.
Tim Englich <tim.englich@intevation.de>
parents:
105
diff
changeset
|
154 } |
10d9a440f52e
ExceptionTest for Responsdocuments added.
Tim Englich <tim.englich@intevation.de>
parents:
105
diff
changeset
|
155 } |
10d9a440f52e
ExceptionTest for Responsdocuments added.
Tim Englich <tim.englich@intevation.de>
parents:
105
diff
changeset
|
156 } 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
|
157 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
|
158 fail(); |
504570de21fd
Refactoring Work depending on Infrastructurchanges in the Artifact-Module
Tim Englich <tim.englich@intevation.de>
parents:
72
diff
changeset
|
159 } |
52
4d6a82b96059
First Implementation of the GNV-Artifacts
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
160 } |
109
678aad19a08d
Some Coderedundances refactored.
Tim Englich <tim.englich@intevation.de>
parents:
107
diff
changeset
|
161 |
678aad19a08d
Some Coderedundances refactored.
Tim Englich <tim.englich@intevation.de>
parents:
107
diff
changeset
|
162 /** |
117
ef157bd2fa92
LanguageSupport integrated
Tim Englich <tim.englich@intevation.de>
parents:
116
diff
changeset
|
163 * @return |
ef157bd2fa92
LanguageSupport integrated
Tim Englich <tim.englich@intevation.de>
parents:
116
diff
changeset
|
164 */ |
ef157bd2fa92
LanguageSupport integrated
Tim Englich <tim.englich@intevation.de>
parents:
116
diff
changeset
|
165 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
|
166 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
|
167 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
|
168 1.0f) }); |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
169 CallContext cc = new TestCallContext(bootstrap.getContext(), callMeta); |
117
ef157bd2fa92
LanguageSupport integrated
Tim Englich <tim.englich@intevation.de>
parents:
116
diff
changeset
|
170 return cc; |
ef157bd2fa92
LanguageSupport integrated
Tim Englich <tim.englich@intevation.de>
parents:
116
diff
changeset
|
171 } |
ef157bd2fa92
LanguageSupport integrated
Tim Englich <tim.englich@intevation.de>
parents:
116
diff
changeset
|
172 |
ef157bd2fa92
LanguageSupport integrated
Tim Englich <tim.englich@intevation.de>
parents:
116
diff
changeset
|
173 /** |
109
678aad19a08d
Some Coderedundances refactored.
Tim Englich <tim.englich@intevation.de>
parents:
107
diff
changeset
|
174 * @param artifact |
678aad19a08d
Some Coderedundances refactored.
Tim Englich <tim.englich@intevation.de>
parents:
107
diff
changeset
|
175 * @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
|
176 * @param describeDocument TODO |
109
678aad19a08d
Some Coderedundances refactored.
Tim Englich <tim.englich@intevation.de>
parents:
107
diff
changeset
|
177 * @throws Exception |
678aad19a08d
Some Coderedundances refactored.
Tim Englich <tim.englich@intevation.de>
parents:
107
diff
changeset
|
178 */ |
171
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
179 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
|
180 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
|
181 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
|
182 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
|
183 // this.writeDocument2Log(outputData); |
111
065ec0a29394
Integrate the type Point into the ArtifactMethod.
Tim Englich <tim.englich@intevation.de>
parents:
109
diff
changeset
|
184 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
|
185 this.check4ExceptionReport(outputData); |
109
678aad19a08d
Some Coderedundances refactored.
Tim Englich <tim.englich@intevation.de>
parents:
107
diff
changeset
|
186 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
|
187 // this.writeDocument2Log(outputData); |
109
678aad19a08d
Some Coderedundances refactored.
Tim Englich <tim.englich@intevation.de>
parents:
107
diff
changeset
|
188 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
|
189 |
109
678aad19a08d
Some Coderedundances refactored.
Tim Englich <tim.englich@intevation.de>
parents:
107
diff
changeset
|
190 } |
171
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
191 |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
192 public void testTimeSeriesMeshArtifact() { |
107
4ebf9ad2e7eb
Added TestCase for TimeSeriesMesh
Tim Englich <tim.englich@intevation.de>
parents:
106
diff
changeset
|
193 try { |
4ebf9ad2e7eb
Added TestCase for TimeSeriesMesh
Tim Englich <tim.englich@intevation.de>
parents:
106
diff
changeset
|
194 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
|
195 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
|
196 ArtifactFactory artifactFactory = this |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
197 .getArtifactFactory(artefactName); |
107
4ebf9ad2e7eb
Added TestCase for TimeSeriesMesh
Tim Englich <tim.englich@intevation.de>
parents:
106
diff
changeset
|
198 assertNotNull(artifactFactory); |
4ebf9ad2e7eb
Added TestCase for TimeSeriesMesh
Tim Englich <tim.englich@intevation.de>
parents:
106
diff
changeset
|
199 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
|
200 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
|
201 "" + System.currentTimeMillis(), bootstrap.getContext()); |
107
4ebf9ad2e7eb
Added TestCase for TimeSeriesMesh
Tim Englich <tim.englich@intevation.de>
parents:
106
diff
changeset
|
202 assertNotNull(artifact); |
4ebf9ad2e7eb
Added TestCase for TimeSeriesMesh
Tim Englich <tim.englich@intevation.de>
parents:
106
diff
changeset
|
203 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
|
204 |
117
ef157bd2fa92
LanguageSupport integrated
Tim Englich <tim.englich@intevation.de>
parents:
116
diff
changeset
|
205 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
|
206 |
222
3e82b4f1c455
Removed some Compilation-Errors according to API-Changes in the ArtifactDatabase.
Tim Englich <tim.englich@intevation.de>
parents:
219
diff
changeset
|
207 Document describeDocument = this.readDocument("src/test/ressources/timeseries_mesh/timeseries_describe.xml"); |
107
4ebf9ad2e7eb
Added TestCase for TimeSeriesMesh
Tim Englich <tim.englich@intevation.de>
parents:
106
diff
changeset
|
208 // Erster Schritt |
171
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
209 this |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
210 .doNextStep( |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
211 artifact, |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
212 cc, |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
213 "src/test/ressources/timeseries_mesh/timeseries_step_01_feed.xml", |
222
3e82b4f1c455
Removed some Compilation-Errors according to API-Changes in the ArtifactDatabase.
Tim Englich <tim.englich@intevation.de>
parents:
219
diff
changeset
|
214 "src/test/ressources/timeseries_mesh/timeseries_step_01_advance.xml", describeDocument); |
171
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
215 |
107
4ebf9ad2e7eb
Added TestCase for TimeSeriesMesh
Tim Englich <tim.englich@intevation.de>
parents:
106
diff
changeset
|
216 // Zweiter Schritt |
171
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
217 this |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
218 .doNextStep( |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
219 artifact, |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
220 cc, |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
221 "src/test/ressources/timeseries_mesh/timeseries_step_02_feed.xml", |
222
3e82b4f1c455
Removed some Compilation-Errors according to API-Changes in the ArtifactDatabase.
Tim Englich <tim.englich@intevation.de>
parents:
219
diff
changeset
|
222 "src/test/ressources/timeseries_mesh/timeseries_step_02_advance.xml", describeDocument); |
171
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
223 |
107
4ebf9ad2e7eb
Added TestCase for TimeSeriesMesh
Tim Englich <tim.englich@intevation.de>
parents:
106
diff
changeset
|
224 // Dritter Schritt |
171
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
225 this |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
226 .doNextStep( |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
227 artifact, |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
228 cc, |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
229 "src/test/ressources/timeseries_mesh/timeseries_step_03_feed.xml", |
222
3e82b4f1c455
Removed some Compilation-Errors according to API-Changes in the ArtifactDatabase.
Tim Englich <tim.englich@intevation.de>
parents:
219
diff
changeset
|
230 "src/test/ressources/timeseries_mesh/timeseries_step_03_advance.xml", describeDocument); |
171
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
231 |
107
4ebf9ad2e7eb
Added TestCase for TimeSeriesMesh
Tim Englich <tim.englich@intevation.de>
parents:
106
diff
changeset
|
232 // Vierter Schritt |
171
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
233 this |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
234 .doNextStep( |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
235 artifact, |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
236 cc, |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
237 "src/test/ressources/timeseries_mesh/timeseries_step_04_feed.xml", |
222
3e82b4f1c455
Removed some Compilation-Errors according to API-Changes in the ArtifactDatabase.
Tim Englich <tim.englich@intevation.de>
parents:
219
diff
changeset
|
238 "src/test/ressources/timeseries_mesh/timeseries_step_04_advance.xml", describeDocument); |
171
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
239 |
107
4ebf9ad2e7eb
Added TestCase for TimeSeriesMesh
Tim Englich <tim.englich@intevation.de>
parents:
106
diff
changeset
|
240 // F�nfter Schritt |
171
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
241 this |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
242 .doNextStep( |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
243 artifact, |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
244 cc, |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
245 "src/test/ressources/timeseries_mesh/timeseries_step_05_feed.xml", |
222
3e82b4f1c455
Removed some Compilation-Errors according to API-Changes in the ArtifactDatabase.
Tim Englich <tim.englich@intevation.de>
parents:
219
diff
changeset
|
246 "src/test/ressources/timeseries_mesh/timeseries_step_05_advance.xml", describeDocument); |
171
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
247 |
107
4ebf9ad2e7eb
Added TestCase for TimeSeriesMesh
Tim Englich <tim.englich@intevation.de>
parents:
106
diff
changeset
|
248 // Sechster Schritt |
171
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
249 this |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
250 .doNextStep( |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
251 artifact, |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
252 cc, |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
253 "src/test/ressources/timeseries_mesh/timeseries_step_06_feed.xml", |
222
3e82b4f1c455
Removed some Compilation-Errors according to API-Changes in the ArtifactDatabase.
Tim Englich <tim.englich@intevation.de>
parents:
219
diff
changeset
|
254 "src/test/ressources/timeseries_mesh/timeseries_step_06_advance.xml", describeDocument); |
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
|
255 |
107
4ebf9ad2e7eb
Added TestCase for TimeSeriesMesh
Tim Englich <tim.englich@intevation.de>
parents:
106
diff
changeset
|
256 // Siebter Schritt |
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
|
257 this |
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
|
258 .doNextStep( |
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
|
259 artifact, |
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
|
260 cc, |
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
|
261 "src/test/ressources/timeseries_mesh/timeseries_step_07_feed.xml", |
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
|
262 "src/test/ressources/timeseries_mesh/timeseries_step_07_advance.xml", describeDocument); |
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
|
263 |
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
|
264 // 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
|
265 Document outputData = artifact.describe(describeDocument,cc); |
107
4ebf9ad2e7eb
Added TestCase for TimeSeriesMesh
Tim Englich <tim.englich@intevation.de>
parents:
106
diff
changeset
|
266 FileOutputStream fos = null; |
4ebf9ad2e7eb
Added TestCase for TimeSeriesMesh
Tim Englich <tim.englich@intevation.de>
parents:
106
diff
changeset
|
267 FileOutputStream fos2 = null; |
4ebf9ad2e7eb
Added TestCase for TimeSeriesMesh
Tim Englich <tim.englich@intevation.de>
parents:
106
diff
changeset
|
268 FileOutputStream fos3 = null; |
171
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
269 try { |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
270 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
|
271 + System.currentTimeMillis() |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
272 + ".png"); |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
273 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
|
274 + System.currentTimeMillis() |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
275 + ".xml"); |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
276 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
|
277 + System.currentTimeMillis() |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
278 + ".csv"); |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
279 artifact |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
280 .feed( |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
281 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
|
282 .readDocument("src/test/ressources/timeseries_mesh/timeseries_step_08_feed.xml"), |
171
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
283 cc); |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
284 artifact |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
285 .out( |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
286 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
|
287 .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
|
288 fos2, cc); |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
289 artifact |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
290 .out( |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
291 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
|
292 .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
|
293 fos, cc); |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
294 artifact |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
295 .out( |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
296 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
|
297 .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
|
298 fos3, cc); |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
299 } catch (Exception e) { |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
300 log.error(e, e); |
107
4ebf9ad2e7eb
Added TestCase for TimeSeriesMesh
Tim Englich <tim.englich@intevation.de>
parents:
106
diff
changeset
|
301 fail(); |
171
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
302 } finally { |
106
10d9a440f52e
ExceptionTest for Responsdocuments added.
Tim Englich <tim.englich@intevation.de>
parents:
105
diff
changeset
|
303 try { |
10d9a440f52e
ExceptionTest for Responsdocuments added.
Tim Englich <tim.englich@intevation.de>
parents:
105
diff
changeset
|
304 fos.flush(); |
10d9a440f52e
ExceptionTest for Responsdocuments added.
Tim Englich <tim.englich@intevation.de>
parents:
105
diff
changeset
|
305 fos.close(); |
10d9a440f52e
ExceptionTest for Responsdocuments added.
Tim Englich <tim.englich@intevation.de>
parents:
105
diff
changeset
|
306 fos2.flush(); |
10d9a440f52e
ExceptionTest for Responsdocuments added.
Tim Englich <tim.englich@intevation.de>
parents:
105
diff
changeset
|
307 fos2.close(); |
10d9a440f52e
ExceptionTest for Responsdocuments added.
Tim Englich <tim.englich@intevation.de>
parents:
105
diff
changeset
|
308 fos3.flush(); |
10d9a440f52e
ExceptionTest for Responsdocuments added.
Tim Englich <tim.englich@intevation.de>
parents:
105
diff
changeset
|
309 fos3.close(); |
10d9a440f52e
ExceptionTest for Responsdocuments added.
Tim Englich <tim.englich@intevation.de>
parents:
105
diff
changeset
|
310 } 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
|
311 log.error(e, e); |
106
10d9a440f52e
ExceptionTest for Responsdocuments added.
Tim Englich <tim.englich@intevation.de>
parents:
105
diff
changeset
|
312 } |
10d9a440f52e
ExceptionTest for Responsdocuments added.
Tim Englich <tim.englich@intevation.de>
parents:
105
diff
changeset
|
313 } |
10d9a440f52e
ExceptionTest for Responsdocuments added.
Tim Englich <tim.englich@intevation.de>
parents:
105
diff
changeset
|
314 } 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
|
315 log.error(e, e); |
103
4042844339ee
Testcases for VerticalProfile and VerticalProfile Instantaneouspoint added
Tim Englich <tim.englich@intevation.de>
parents:
102
diff
changeset
|
316 fail(); |
4042844339ee
Testcases for VerticalProfile and VerticalProfile Instantaneouspoint added
Tim Englich <tim.englich@intevation.de>
parents:
102
diff
changeset
|
317 } |
4042844339ee
Testcases for VerticalProfile and VerticalProfile Instantaneouspoint added
Tim Englich <tim.englich@intevation.de>
parents:
102
diff
changeset
|
318 } |
171
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
319 |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
320 public void testVerticalProfileArtifact() { |
106
10d9a440f52e
ExceptionTest for Responsdocuments added.
Tim Englich <tim.englich@intevation.de>
parents:
105
diff
changeset
|
321 try { |
10d9a440f52e
ExceptionTest for Responsdocuments added.
Tim Englich <tim.englich@intevation.de>
parents:
105
diff
changeset
|
322 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
|
323 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
|
324 ArtifactFactory artifactFactory = this |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
325 .getArtifactFactory(artefactName); |
106
10d9a440f52e
ExceptionTest for Responsdocuments added.
Tim Englich <tim.englich@intevation.de>
parents:
105
diff
changeset
|
326 assertNotNull(artifactFactory); |
10d9a440f52e
ExceptionTest for Responsdocuments added.
Tim Englich <tim.englich@intevation.de>
parents:
105
diff
changeset
|
327 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
|
328 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
|
329 "" + System.currentTimeMillis(), bootstrap.getContext()); |
106
10d9a440f52e
ExceptionTest for Responsdocuments added.
Tim Englich <tim.englich@intevation.de>
parents:
105
diff
changeset
|
330 assertNotNull(artifact); |
10d9a440f52e
ExceptionTest for Responsdocuments added.
Tim Englich <tim.englich@intevation.de>
parents:
105
diff
changeset
|
331 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
|
332 |
117
ef157bd2fa92
LanguageSupport integrated
Tim Englich <tim.englich@intevation.de>
parents:
116
diff
changeset
|
333 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
|
334 |
222
3e82b4f1c455
Removed some Compilation-Errors according to API-Changes in the ArtifactDatabase.
Tim Englich <tim.englich@intevation.de>
parents:
219
diff
changeset
|
335 Document describeDocument = this.readDocument("src/test/ressources/verticalprofile/verticalprofile_describe.xml"); |
106
10d9a440f52e
ExceptionTest for Responsdocuments added.
Tim Englich <tim.englich@intevation.de>
parents:
105
diff
changeset
|
336 // Erster Schritt |
171
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
337 this |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
338 .doNextStep( |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
339 artifact, |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
340 cc, |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
341 "src/test/ressources/verticalprofile/verticalprofile_step_01_feed.xml", |
222
3e82b4f1c455
Removed some Compilation-Errors according to API-Changes in the ArtifactDatabase.
Tim Englich <tim.englich@intevation.de>
parents:
219
diff
changeset
|
342 "src/test/ressources/verticalprofile/verticalprofile_step_02_advance.xml", describeDocument); |
171
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
343 |
106
10d9a440f52e
ExceptionTest for Responsdocuments added.
Tim Englich <tim.englich@intevation.de>
parents:
105
diff
changeset
|
344 // Zweiter Schritt |
171
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
345 this |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
346 .doNextStep( |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
347 artifact, |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
348 cc, |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
349 "src/test/ressources/verticalprofile/verticalprofile_step_02_feed.xml", |
222
3e82b4f1c455
Removed some Compilation-Errors according to API-Changes in the ArtifactDatabase.
Tim Englich <tim.englich@intevation.de>
parents:
219
diff
changeset
|
350 "src/test/ressources/verticalprofile/verticalprofile_step_02_advance.xml", describeDocument); |
171
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
351 |
106
10d9a440f52e
ExceptionTest for Responsdocuments added.
Tim Englich <tim.englich@intevation.de>
parents:
105
diff
changeset
|
352 // Dritter Schritt |
171
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
353 this |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
354 .doNextStep( |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
355 artifact, |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
356 cc, |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
357 "src/test/ressources/verticalprofile/verticalprofile_step_03_feed.xml", |
222
3e82b4f1c455
Removed some Compilation-Errors according to API-Changes in the ArtifactDatabase.
Tim Englich <tim.englich@intevation.de>
parents:
219
diff
changeset
|
358 "src/test/ressources/verticalprofile/verticalprofile_step_03_advance.xml", describeDocument); |
211
310874d3573f
Minimum and Maximum Depth should be entered by the User issue31
Tim Englich <tim.englich@intevation.de>
parents:
200
diff
changeset
|
359 |
310874d3573f
Minimum and Maximum Depth should be entered by the User issue31
Tim Englich <tim.englich@intevation.de>
parents:
200
diff
changeset
|
360 // Vierter Schritt |
310874d3573f
Minimum and Maximum Depth should be entered by the User issue31
Tim Englich <tim.englich@intevation.de>
parents:
200
diff
changeset
|
361 this |
310874d3573f
Minimum and Maximum Depth should be entered by the User issue31
Tim Englich <tim.englich@intevation.de>
parents:
200
diff
changeset
|
362 .doNextStep( |
310874d3573f
Minimum and Maximum Depth should be entered by the User issue31
Tim Englich <tim.englich@intevation.de>
parents:
200
diff
changeset
|
363 artifact, |
310874d3573f
Minimum and Maximum Depth should be entered by the User issue31
Tim Englich <tim.englich@intevation.de>
parents:
200
diff
changeset
|
364 cc, |
310874d3573f
Minimum and Maximum Depth should be entered by the User issue31
Tim Englich <tim.englich@intevation.de>
parents:
200
diff
changeset
|
365 "src/test/ressources/verticalprofile/verticalprofile_step_04_feed.xml", |
222
3e82b4f1c455
Removed some Compilation-Errors according to API-Changes in the ArtifactDatabase.
Tim Englich <tim.englich@intevation.de>
parents:
219
diff
changeset
|
366 "src/test/ressources/verticalprofile/verticalprofile_step_04_advance.xml", describeDocument); |
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
|
367 |
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
|
368 // F�nfter Schritt |
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
|
369 this |
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
|
370 .doNextStep( |
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
|
371 artifact, |
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
|
372 cc, |
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
|
373 "src/test/ressources/verticalprofile/verticalprofile_step_05_feed.xml", |
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
|
374 "src/test/ressources/verticalprofile/verticalprofile_step_05_advance.xml", describeDocument); |
211
310874d3573f
Minimum and Maximum Depth should be entered by the User issue31
Tim Englich <tim.englich@intevation.de>
parents:
200
diff
changeset
|
375 |
171
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
376 |
107
4ebf9ad2e7eb
Added TestCase for TimeSeriesMesh
Tim Englich <tim.englich@intevation.de>
parents:
106
diff
changeset
|
377 // 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
|
378 Document outputData = artifact.describe(describeDocument,cc); |
106
10d9a440f52e
ExceptionTest for Responsdocuments added.
Tim Englich <tim.englich@intevation.de>
parents:
105
diff
changeset
|
379 FileOutputStream fos = null; |
10d9a440f52e
ExceptionTest for Responsdocuments added.
Tim Englich <tim.englich@intevation.de>
parents:
105
diff
changeset
|
380 FileOutputStream fos2 = null; |
10d9a440f52e
ExceptionTest for Responsdocuments added.
Tim Englich <tim.englich@intevation.de>
parents:
105
diff
changeset
|
381 FileOutputStream fos3 = null; |
171
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
382 try { |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
383 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
|
384 + System.currentTimeMillis() |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
385 + ".png"); |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
386 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
|
387 + System.currentTimeMillis() |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
388 + ".xml"); |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
389 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
|
390 + System.currentTimeMillis() |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
391 + ".csv"); |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
392 artifact |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
393 .feed( |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
394 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
|
395 .readDocument("src/test/ressources/verticalprofile/verticalprofile_step_06_feed.xml"), |
171
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
396 cc); |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
397 artifact |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
398 .out( |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
399 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
|
400 .readDocument("src/test/ressources/verticalprofile/verticalprofile_step_06_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
|
401 fos2, cc); |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
402 artifact |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
403 .out( |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
404 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
|
405 .readDocument("src/test/ressources/verticalprofile/verticalprofile_step_06_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
|
406 fos, cc); |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
407 artifact |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
408 .out( |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
409 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
|
410 .readDocument("src/test/ressources/verticalprofile/verticalprofile_step_06_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
|
411 fos3, cc); |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
412 } catch (Exception e) { |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
413 log.error(e, e); |
106
10d9a440f52e
ExceptionTest for Responsdocuments added.
Tim Englich <tim.englich@intevation.de>
parents:
105
diff
changeset
|
414 fail(); |
171
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
415 } finally { |
106
10d9a440f52e
ExceptionTest for Responsdocuments added.
Tim Englich <tim.englich@intevation.de>
parents:
105
diff
changeset
|
416 try { |
10d9a440f52e
ExceptionTest for Responsdocuments added.
Tim Englich <tim.englich@intevation.de>
parents:
105
diff
changeset
|
417 fos.flush(); |
10d9a440f52e
ExceptionTest for Responsdocuments added.
Tim Englich <tim.englich@intevation.de>
parents:
105
diff
changeset
|
418 fos.close(); |
10d9a440f52e
ExceptionTest for Responsdocuments added.
Tim Englich <tim.englich@intevation.de>
parents:
105
diff
changeset
|
419 fos2.flush(); |
10d9a440f52e
ExceptionTest for Responsdocuments added.
Tim Englich <tim.englich@intevation.de>
parents:
105
diff
changeset
|
420 fos2.close(); |
10d9a440f52e
ExceptionTest for Responsdocuments added.
Tim Englich <tim.englich@intevation.de>
parents:
105
diff
changeset
|
421 fos3.flush(); |
10d9a440f52e
ExceptionTest for Responsdocuments added.
Tim Englich <tim.englich@intevation.de>
parents:
105
diff
changeset
|
422 fos3.close(); |
10d9a440f52e
ExceptionTest for Responsdocuments added.
Tim Englich <tim.englich@intevation.de>
parents:
105
diff
changeset
|
423 } 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
|
424 log.error(e, e); |
106
10d9a440f52e
ExceptionTest for Responsdocuments added.
Tim Englich <tim.englich@intevation.de>
parents:
105
diff
changeset
|
425 } |
10d9a440f52e
ExceptionTest for Responsdocuments added.
Tim Englich <tim.englich@intevation.de>
parents:
105
diff
changeset
|
426 } |
10d9a440f52e
ExceptionTest for Responsdocuments added.
Tim Englich <tim.englich@intevation.de>
parents:
105
diff
changeset
|
427 } 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
|
428 log.error(e, e); |
103
4042844339ee
Testcases for VerticalProfile and VerticalProfile Instantaneouspoint added
Tim Englich <tim.englich@intevation.de>
parents:
102
diff
changeset
|
429 fail(); |
4042844339ee
Testcases for VerticalProfile and VerticalProfile Instantaneouspoint added
Tim Englich <tim.englich@intevation.de>
parents:
102
diff
changeset
|
430 } |
4042844339ee
Testcases for VerticalProfile and VerticalProfile Instantaneouspoint added
Tim Englich <tim.englich@intevation.de>
parents:
102
diff
changeset
|
431 } |
171
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
432 |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
433 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
|
434 try { |
171
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
435 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
|
436 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
|
437 ArtifactFactory artifactFactory = this |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
438 .getArtifactFactory(artefactName); |
114
d8d38a4dd965
Added TestCase for HorizontalProfiles of InstataneousPoints and the required Configuration
Tim Englich <tim.englich@intevation.de>
parents:
111
diff
changeset
|
439 assertNotNull(artifactFactory); |
d8d38a4dd965
Added TestCase for HorizontalProfiles of InstataneousPoints and the required Configuration
Tim Englich <tim.englich@intevation.de>
parents:
111
diff
changeset
|
440 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
|
441 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
|
442 "" + 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
|
443 assertNotNull(artifact); |
d8d38a4dd965
Added TestCase for HorizontalProfiles of InstataneousPoints and the required Configuration
Tim Englich <tim.englich@intevation.de>
parents:
111
diff
changeset
|
444 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
|
445 |
117
ef157bd2fa92
LanguageSupport integrated
Tim Englich <tim.englich@intevation.de>
parents:
116
diff
changeset
|
446 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
|
447 Document describeDocument = this.readDocument("src/test/ressources/verticalprofile_mesh/verticalprofile_describe.xml"); |
114
d8d38a4dd965
Added TestCase for HorizontalProfiles of InstataneousPoints and the required Configuration
Tim Englich <tim.englich@intevation.de>
parents:
111
diff
changeset
|
448 // Erster Schritt |
171
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
449 this |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
450 .doNextStep( |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
451 artifact, |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
452 cc, |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
453 "src/test/ressources/verticalprofile_mesh/verticalprofile_step_01_feed.xml", |
222
3e82b4f1c455
Removed some Compilation-Errors according to API-Changes in the ArtifactDatabase.
Tim Englich <tim.englich@intevation.de>
parents:
219
diff
changeset
|
454 "src/test/ressources/verticalprofile_mesh/verticalprofile_step_01_advance.xml", describeDocument); |
171
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
455 |
114
d8d38a4dd965
Added TestCase for HorizontalProfiles of InstataneousPoints and the required Configuration
Tim Englich <tim.englich@intevation.de>
parents:
111
diff
changeset
|
456 // Zweiter Schritt |
171
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
457 this |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
458 .doNextStep( |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
459 artifact, |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
460 cc, |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
461 "src/test/ressources/verticalprofile_mesh/verticalprofile_step_02_feed.xml", |
222
3e82b4f1c455
Removed some Compilation-Errors according to API-Changes in the ArtifactDatabase.
Tim Englich <tim.englich@intevation.de>
parents:
219
diff
changeset
|
462 "src/test/ressources/verticalprofile_mesh/verticalprofile_step_02_advance.xml", describeDocument); |
171
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
463 |
114
d8d38a4dd965
Added TestCase for HorizontalProfiles of InstataneousPoints and the required Configuration
Tim Englich <tim.englich@intevation.de>
parents:
111
diff
changeset
|
464 // Dritter Schritt |
171
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
465 this |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
466 .doNextStep( |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
467 artifact, |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
468 cc, |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
469 "src/test/ressources/verticalprofile_mesh/verticalprofile_step_03_feed.xml", |
222
3e82b4f1c455
Removed some Compilation-Errors according to API-Changes in the ArtifactDatabase.
Tim Englich <tim.englich@intevation.de>
parents:
219
diff
changeset
|
470 "src/test/ressources/verticalprofile_mesh/verticalprofile_step_03_advance.xml", describeDocument); |
171
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
471 |
114
d8d38a4dd965
Added TestCase for HorizontalProfiles of InstataneousPoints and the required Configuration
Tim Englich <tim.englich@intevation.de>
parents:
111
diff
changeset
|
472 // Vierter Schritt |
171
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
473 this |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
474 .doNextStep( |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
475 artifact, |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
476 cc, |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
477 "src/test/ressources/verticalprofile_mesh/verticalprofile_step_04_feed.xml", |
222
3e82b4f1c455
Removed some Compilation-Errors according to API-Changes in the ArtifactDatabase.
Tim Englich <tim.englich@intevation.de>
parents:
219
diff
changeset
|
478 "src/test/ressources/verticalprofile_mesh/verticalprofile_step_04_advance.xml", describeDocument); |
171
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
479 |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
480 // F�nfter Schritt |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
481 this |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
482 .doNextStep( |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
483 artifact, |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
484 cc, |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
485 "src/test/ressources/verticalprofile_mesh/verticalprofile_step_05_feed.xml", |
222
3e82b4f1c455
Removed some Compilation-Errors according to API-Changes in the ArtifactDatabase.
Tim Englich <tim.englich@intevation.de>
parents:
219
diff
changeset
|
486 "src/test/ressources/verticalprofile_mesh/verticalprofile_step_05_advance.xml", describeDocument); |
213
c0a798299efc
Integration of the selection of the min and max Layer used in Verticalprofiles of Meshes. issue61
Tim Englich <tim.englich@intevation.de>
parents:
211
diff
changeset
|
487 |
c0a798299efc
Integration of the selection of the min and max Layer used in Verticalprofiles of Meshes. issue61
Tim Englich <tim.englich@intevation.de>
parents:
211
diff
changeset
|
488 // Sechster Schritt |
c0a798299efc
Integration of the selection of the min and max Layer used in Verticalprofiles of Meshes. issue61
Tim Englich <tim.englich@intevation.de>
parents:
211
diff
changeset
|
489 this |
c0a798299efc
Integration of the selection of the min and max Layer used in Verticalprofiles of Meshes. issue61
Tim Englich <tim.englich@intevation.de>
parents:
211
diff
changeset
|
490 .doNextStep( |
c0a798299efc
Integration of the selection of the min and max Layer used in Verticalprofiles of Meshes. issue61
Tim Englich <tim.englich@intevation.de>
parents:
211
diff
changeset
|
491 artifact, |
c0a798299efc
Integration of the selection of the min and max Layer used in Verticalprofiles of Meshes. issue61
Tim Englich <tim.englich@intevation.de>
parents:
211
diff
changeset
|
492 cc, |
c0a798299efc
Integration of the selection of the min and max Layer used in Verticalprofiles of Meshes. issue61
Tim Englich <tim.englich@intevation.de>
parents:
211
diff
changeset
|
493 "src/test/ressources/verticalprofile_mesh/verticalprofile_step_06_feed.xml", |
222
3e82b4f1c455
Removed some Compilation-Errors according to API-Changes in the ArtifactDatabase.
Tim Englich <tim.englich@intevation.de>
parents:
219
diff
changeset
|
494 "src/test/ressources/verticalprofile_mesh/verticalprofile_step_06_advance.xml", describeDocument); |
213
c0a798299efc
Integration of the selection of the min and max Layer used in Verticalprofiles of Meshes. issue61
Tim Englich <tim.englich@intevation.de>
parents:
211
diff
changeset
|
495 |
c0a798299efc
Integration of the selection of the min and max Layer used in Verticalprofiles of Meshes. issue61
Tim Englich <tim.englich@intevation.de>
parents:
211
diff
changeset
|
496 // Siebter Schritt |
c0a798299efc
Integration of the selection of the min and max Layer used in Verticalprofiles of Meshes. issue61
Tim Englich <tim.englich@intevation.de>
parents:
211
diff
changeset
|
497 this |
c0a798299efc
Integration of the selection of the min and max Layer used in Verticalprofiles of Meshes. issue61
Tim Englich <tim.englich@intevation.de>
parents:
211
diff
changeset
|
498 .doNextStep( |
c0a798299efc
Integration of the selection of the min and max Layer used in Verticalprofiles of Meshes. issue61
Tim Englich <tim.englich@intevation.de>
parents:
211
diff
changeset
|
499 artifact, |
c0a798299efc
Integration of the selection of the min and max Layer used in Verticalprofiles of Meshes. issue61
Tim Englich <tim.englich@intevation.de>
parents:
211
diff
changeset
|
500 cc, |
c0a798299efc
Integration of the selection of the min and max Layer used in Verticalprofiles of Meshes. issue61
Tim Englich <tim.englich@intevation.de>
parents:
211
diff
changeset
|
501 "src/test/ressources/verticalprofile_mesh/verticalprofile_step_07_feed.xml", |
222
3e82b4f1c455
Removed some Compilation-Errors according to API-Changes in the ArtifactDatabase.
Tim Englich <tim.englich@intevation.de>
parents:
219
diff
changeset
|
502 "src/test/ressources/verticalprofile_mesh/verticalprofile_step_07_advance.xml", describeDocument); |
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
|
503 |
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
|
504 // Achter Schritt |
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
|
505 this |
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
|
506 .doNextStep( |
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
|
507 artifact, |
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
|
508 cc, |
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
|
509 "src/test/ressources/verticalprofile_mesh/verticalprofile_step_08_feed.xml", |
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
|
510 "src/test/ressources/verticalprofile_mesh/verticalprofile_step_08_advance.xml", describeDocument); |
171
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
511 |
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
|
512 |
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
|
513 // Neunter Schritt |
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
|
514 this |
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
|
515 .doNextStep( |
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
|
516 artifact, |
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
|
517 cc, |
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
|
518 "src/test/ressources/verticalprofile_mesh/verticalprofile_step_09_feed.xml", |
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
|
519 "src/test/ressources/verticalprofile_mesh/verticalprofile_step_09_advance.xml", describeDocument); |
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
|
520 |
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
|
521 |
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
|
522 // 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
|
523 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
|
524 FileOutputStream fos = null; |
d8d38a4dd965
Added TestCase for HorizontalProfiles of InstataneousPoints and the required Configuration
Tim Englich <tim.englich@intevation.de>
parents:
111
diff
changeset
|
525 FileOutputStream fos2 = null; |
d8d38a4dd965
Added TestCase for HorizontalProfiles of InstataneousPoints and the required Configuration
Tim Englich <tim.englich@intevation.de>
parents:
111
diff
changeset
|
526 FileOutputStream fos3 = null; |
171
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
527 try { |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
528 fos = new FileOutputStream( |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
529 "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
|
530 + System.currentTimeMillis() + ".png"); |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
531 fos2 = new FileOutputStream( |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
532 "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
|
533 + System.currentTimeMillis() + ".xml"); |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
534 fos3 = new FileOutputStream( |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
535 "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
|
536 + System.currentTimeMillis() + ".csv"); |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
537 artifact |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
538 .feed( |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
539 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
|
540 .readDocument("src/test/ressources/verticalprofile_mesh/verticalprofile_step_10_feed.xml"), |
171
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
541 cc); |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
542 artifact |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
543 .out( |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
544 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
|
545 .readDocument("src/test/ressources/verticalprofile_mesh/verticalprofile_step_10_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
|
546 fos2, cc); |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
547 artifact |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
548 .out( |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
549 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
|
550 .readDocument("src/test/ressources/verticalprofile_mesh/verticalprofile_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
|
551 fos, cc); |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
552 artifact |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
553 .out( |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
554 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
|
555 .readDocument("src/test/ressources/verticalprofile_mesh/verticalprofile_step_10_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
|
556 fos3, cc); |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
557 } catch (Exception e) { |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
558 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
|
559 fail(); |
171
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
560 } finally { |
114
d8d38a4dd965
Added TestCase for HorizontalProfiles of InstataneousPoints and the required Configuration
Tim Englich <tim.englich@intevation.de>
parents:
111
diff
changeset
|
561 try { |
d8d38a4dd965
Added TestCase for HorizontalProfiles of InstataneousPoints and the required Configuration
Tim Englich <tim.englich@intevation.de>
parents:
111
diff
changeset
|
562 fos.flush(); |
d8d38a4dd965
Added TestCase for HorizontalProfiles of InstataneousPoints and the required Configuration
Tim Englich <tim.englich@intevation.de>
parents:
111
diff
changeset
|
563 fos.close(); |
d8d38a4dd965
Added TestCase for HorizontalProfiles of InstataneousPoints and the required Configuration
Tim Englich <tim.englich@intevation.de>
parents:
111
diff
changeset
|
564 fos2.flush(); |
d8d38a4dd965
Added TestCase for HorizontalProfiles of InstataneousPoints and the required Configuration
Tim Englich <tim.englich@intevation.de>
parents:
111
diff
changeset
|
565 fos2.close(); |
d8d38a4dd965
Added TestCase for HorizontalProfiles of InstataneousPoints and the required Configuration
Tim Englich <tim.englich@intevation.de>
parents:
111
diff
changeset
|
566 fos3.flush(); |
d8d38a4dd965
Added TestCase for HorizontalProfiles of InstataneousPoints and the required Configuration
Tim Englich <tim.englich@intevation.de>
parents:
111
diff
changeset
|
567 fos3.close(); |
d8d38a4dd965
Added TestCase for HorizontalProfiles of InstataneousPoints and the required Configuration
Tim Englich <tim.englich@intevation.de>
parents:
111
diff
changeset
|
568 } 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
|
569 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
|
570 } |
d8d38a4dd965
Added TestCase for HorizontalProfiles of InstataneousPoints and the required Configuration
Tim Englich <tim.englich@intevation.de>
parents:
111
diff
changeset
|
571 } |
d8d38a4dd965
Added TestCase for HorizontalProfiles of InstataneousPoints and the required Configuration
Tim Englich <tim.englich@intevation.de>
parents:
111
diff
changeset
|
572 } 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
|
573 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
|
574 fail(); |
d8d38a4dd965
Added TestCase for HorizontalProfiles of InstataneousPoints and the required Configuration
Tim Englich <tim.englich@intevation.de>
parents:
111
diff
changeset
|
575 } |
d8d38a4dd965
Added TestCase for HorizontalProfiles of InstataneousPoints and the required Configuration
Tim Englich <tim.englich@intevation.de>
parents:
111
diff
changeset
|
576 } |
171
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
577 |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
578 public void testVerticalProfileInstantaneousPointArtifact() { |
116
820238357bab
Added Horizontal-Profile-Support for Meshes.
Tim Englich <tim.englich@intevation.de>
parents:
114
diff
changeset
|
579 try { |
171
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
580 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
|
581 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
|
582 ArtifactFactory artifactFactory = this |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
583 .getArtifactFactory(artefactName); |
116
820238357bab
Added Horizontal-Profile-Support for Meshes.
Tim Englich <tim.englich@intevation.de>
parents:
114
diff
changeset
|
584 assertNotNull(artifactFactory); |
820238357bab
Added Horizontal-Profile-Support for Meshes.
Tim Englich <tim.englich@intevation.de>
parents:
114
diff
changeset
|
585 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
|
586 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
|
587 "" + System.currentTimeMillis(), bootstrap.getContext()); |
116
820238357bab
Added Horizontal-Profile-Support for Meshes.
Tim Englich <tim.englich@intevation.de>
parents:
114
diff
changeset
|
588 assertNotNull(artifact); |
820238357bab
Added Horizontal-Profile-Support for Meshes.
Tim Englich <tim.englich@intevation.de>
parents:
114
diff
changeset
|
589 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
|
590 |
117
ef157bd2fa92
LanguageSupport integrated
Tim Englich <tim.englich@intevation.de>
parents:
116
diff
changeset
|
591 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
|
592 Document describeDocument = this.readDocument("src/test/ressources/verticalprofile_instantaneouspoint/verticalprofile_describe.xml"); |
116
820238357bab
Added Horizontal-Profile-Support for Meshes.
Tim Englich <tim.englich@intevation.de>
parents:
114
diff
changeset
|
593 // Erster Schritt |
171
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
594 this |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
595 .doNextStep( |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
596 artifact, |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
597 cc, |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
598 "src/test/ressources/verticalprofile_instantaneouspoint/verticalprofile_step_01_feed.xml", |
222
3e82b4f1c455
Removed some Compilation-Errors according to API-Changes in the ArtifactDatabase.
Tim Englich <tim.englich@intevation.de>
parents:
219
diff
changeset
|
599 "src/test/ressources/verticalprofile_instantaneouspoint/verticalprofile_step_01_advance.xml", describeDocument); |
171
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
600 |
116
820238357bab
Added Horizontal-Profile-Support for Meshes.
Tim Englich <tim.englich@intevation.de>
parents:
114
diff
changeset
|
601 // Zweiter Schritt |
171
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
602 this |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
603 .doNextStep( |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
604 artifact, |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
605 cc, |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
606 "src/test/ressources/verticalprofile_instantaneouspoint/verticalprofile_step_02_feed.xml", |
222
3e82b4f1c455
Removed some Compilation-Errors according to API-Changes in the ArtifactDatabase.
Tim Englich <tim.englich@intevation.de>
parents:
219
diff
changeset
|
607 "src/test/ressources/verticalprofile_instantaneouspoint/verticalprofile_step_02_advance.xml", describeDocument); |
171
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
608 |
116
820238357bab
Added Horizontal-Profile-Support for Meshes.
Tim Englich <tim.englich@intevation.de>
parents:
114
diff
changeset
|
609 // Dritter Schritt |
171
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
610 this |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
611 .doNextStep( |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
612 artifact, |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
613 cc, |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
614 "src/test/ressources/verticalprofile_instantaneouspoint/verticalprofile_step_03_feed.xml", |
222
3e82b4f1c455
Removed some Compilation-Errors according to API-Changes in the ArtifactDatabase.
Tim Englich <tim.englich@intevation.de>
parents:
219
diff
changeset
|
615 "src/test/ressources/verticalprofile_instantaneouspoint/verticalprofile_step_03_advance.xml", describeDocument); |
211
310874d3573f
Minimum and Maximum Depth should be entered by the User issue31
Tim Englich <tim.englich@intevation.de>
parents:
200
diff
changeset
|
616 // Vierter Schritt |
310874d3573f
Minimum and Maximum Depth should be entered by the User issue31
Tim Englich <tim.englich@intevation.de>
parents:
200
diff
changeset
|
617 this |
310874d3573f
Minimum and Maximum Depth should be entered by the User issue31
Tim Englich <tim.englich@intevation.de>
parents:
200
diff
changeset
|
618 .doNextStep( |
310874d3573f
Minimum and Maximum Depth should be entered by the User issue31
Tim Englich <tim.englich@intevation.de>
parents:
200
diff
changeset
|
619 artifact, |
310874d3573f
Minimum and Maximum Depth should be entered by the User issue31
Tim Englich <tim.englich@intevation.de>
parents:
200
diff
changeset
|
620 cc, |
310874d3573f
Minimum and Maximum Depth should be entered by the User issue31
Tim Englich <tim.englich@intevation.de>
parents:
200
diff
changeset
|
621 "src/test/ressources/verticalprofile_instantaneouspoint/verticalprofile_step_04_feed.xml", |
222
3e82b4f1c455
Removed some Compilation-Errors according to API-Changes in the ArtifactDatabase.
Tim Englich <tim.englich@intevation.de>
parents:
219
diff
changeset
|
622 "src/test/ressources/verticalprofile_instantaneouspoint/verticalprofile_step_04_advance.xml", describeDocument); |
171
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
623 |
116
820238357bab
Added Horizontal-Profile-Support for Meshes.
Tim Englich <tim.englich@intevation.de>
parents:
114
diff
changeset
|
624 // 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
|
625 Document outputData = artifact.describe(describeDocument,cc); |
116
820238357bab
Added Horizontal-Profile-Support for Meshes.
Tim Englich <tim.englich@intevation.de>
parents:
114
diff
changeset
|
626 FileOutputStream fos = null; |
820238357bab
Added Horizontal-Profile-Support for Meshes.
Tim Englich <tim.englich@intevation.de>
parents:
114
diff
changeset
|
627 FileOutputStream fos2 = null; |
820238357bab
Added Horizontal-Profile-Support for Meshes.
Tim Englich <tim.englich@intevation.de>
parents:
114
diff
changeset
|
628 FileOutputStream fos3 = null; |
171
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
629 try { |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
630 fos = new FileOutputStream( |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
631 "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
|
632 + System.currentTimeMillis() + ".png"); |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
633 fos2 = new FileOutputStream( |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
634 "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
|
635 + System.currentTimeMillis() + ".xml"); |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
636 fos3 = new FileOutputStream( |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
637 "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
|
638 + System.currentTimeMillis() + ".csv"); |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
639 artifact |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
640 .feed( |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
641 this |
211
310874d3573f
Minimum and Maximum Depth should be entered by the User issue31
Tim Englich <tim.englich@intevation.de>
parents:
200
diff
changeset
|
642 .readDocument("src/test/ressources/verticalprofile_instantaneouspoint/verticalprofile_step_05_feed.xml"), |
171
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
643 cc); |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
644 artifact |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
645 .out( |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
646 this |
211
310874d3573f
Minimum and Maximum Depth should be entered by the User issue31
Tim Englich <tim.englich@intevation.de>
parents:
200
diff
changeset
|
647 .readDocument("src/test/ressources/verticalprofile_instantaneouspoint/verticalprofile_step_05_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
|
648 fos2, cc); |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
649 artifact |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
650 .out( |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
651 this |
211
310874d3573f
Minimum and Maximum Depth should be entered by the User issue31
Tim Englich <tim.englich@intevation.de>
parents:
200
diff
changeset
|
652 .readDocument("src/test/ressources/verticalprofile_instantaneouspoint/verticalprofile_step_05_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
|
653 fos, cc); |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
654 artifact |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
655 .out( |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
656 this |
211
310874d3573f
Minimum and Maximum Depth should be entered by the User issue31
Tim Englich <tim.englich@intevation.de>
parents:
200
diff
changeset
|
657 .readDocument("src/test/ressources/verticalprofile_instantaneouspoint/verticalprofile_step_05_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
|
658 fos3, cc); |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
659 } catch (Exception e) { |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
660 log.error(e, e); |
116
820238357bab
Added Horizontal-Profile-Support for Meshes.
Tim Englich <tim.englich@intevation.de>
parents:
114
diff
changeset
|
661 fail(); |
171
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
662 } finally { |
116
820238357bab
Added Horizontal-Profile-Support for Meshes.
Tim Englich <tim.englich@intevation.de>
parents:
114
diff
changeset
|
663 try { |
820238357bab
Added Horizontal-Profile-Support for Meshes.
Tim Englich <tim.englich@intevation.de>
parents:
114
diff
changeset
|
664 fos.flush(); |
820238357bab
Added Horizontal-Profile-Support for Meshes.
Tim Englich <tim.englich@intevation.de>
parents:
114
diff
changeset
|
665 fos.close(); |
820238357bab
Added Horizontal-Profile-Support for Meshes.
Tim Englich <tim.englich@intevation.de>
parents:
114
diff
changeset
|
666 fos2.flush(); |
820238357bab
Added Horizontal-Profile-Support for Meshes.
Tim Englich <tim.englich@intevation.de>
parents:
114
diff
changeset
|
667 fos2.close(); |
820238357bab
Added Horizontal-Profile-Support for Meshes.
Tim Englich <tim.englich@intevation.de>
parents:
114
diff
changeset
|
668 fos3.flush(); |
820238357bab
Added Horizontal-Profile-Support for Meshes.
Tim Englich <tim.englich@intevation.de>
parents:
114
diff
changeset
|
669 fos3.close(); |
820238357bab
Added Horizontal-Profile-Support for Meshes.
Tim Englich <tim.englich@intevation.de>
parents:
114
diff
changeset
|
670 } 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
|
671 log.error(e, e); |
116
820238357bab
Added Horizontal-Profile-Support for Meshes.
Tim Englich <tim.englich@intevation.de>
parents:
114
diff
changeset
|
672 } |
820238357bab
Added Horizontal-Profile-Support for Meshes.
Tim Englich <tim.englich@intevation.de>
parents:
114
diff
changeset
|
673 } |
820238357bab
Added Horizontal-Profile-Support for Meshes.
Tim Englich <tim.englich@intevation.de>
parents:
114
diff
changeset
|
674 } 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
|
675 log.error(e, e); |
116
820238357bab
Added Horizontal-Profile-Support for Meshes.
Tim Englich <tim.englich@intevation.de>
parents:
114
diff
changeset
|
676 fail(); |
820238357bab
Added Horizontal-Profile-Support for Meshes.
Tim Englich <tim.englich@intevation.de>
parents:
114
diff
changeset
|
677 } |
820238357bab
Added Horizontal-Profile-Support for Meshes.
Tim Englich <tim.englich@intevation.de>
parents:
114
diff
changeset
|
678 } |
171
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
679 |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
680 public void testHorizontalProfileInstantaneousPointArtifact() { |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
681 try { |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
682 log |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
683 .debug("GNVArtifactsTestCase.testHorizontalProfileInstantaneousPointArtifact"); |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
684 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
|
685 ArtifactFactory artifactFactory = this |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
686 .getArtifactFactory(artefactName); |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
687 assertNotNull(artifactFactory); |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
688 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
|
689 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
|
690 "" + 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
|
691 assertNotNull(artifact); |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
692 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
|
693 |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
694 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
|
695 Document describeDocument = this.readDocument("src/test/ressources/horizontalProfile_instantaneouspoint/horizontalprofile_describe.xml"); |
171
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
696 // Erster Schritt |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
697 this |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
698 .doNextStep( |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
699 artifact, |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
700 cc, |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
701 "src/test/ressources/horizontalProfile_instantaneouspoint/horizontalprofile_step_00_feed.xml", |
222
3e82b4f1c455
Removed some Compilation-Errors according to API-Changes in the ArtifactDatabase.
Tim Englich <tim.englich@intevation.de>
parents:
219
diff
changeset
|
702 "src/test/ressources/horizontalProfile_instantaneouspoint/horizontalprofile_step_00_advance.xml", describeDocument); |
171
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
703 |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
704 // Erster Schritt |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
705 this |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
706 .doNextStep( |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
707 artifact, |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
708 cc, |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
709 "src/test/ressources/horizontalProfile_instantaneouspoint/horizontalprofile_step_01_feed.xml", |
222
3e82b4f1c455
Removed some Compilation-Errors according to API-Changes in the ArtifactDatabase.
Tim Englich <tim.englich@intevation.de>
parents:
219
diff
changeset
|
710 "src/test/ressources/horizontalProfile_instantaneouspoint/horizontalprofile_step_01_advance.xml", describeDocument); |
171
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 // Zweiter Schritt |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
713 this |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
714 .doNextStep( |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
715 artifact, |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
716 cc, |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
717 "src/test/ressources/horizontalProfile_instantaneouspoint/horizontalprofile_step_02_feed.xml", |
222
3e82b4f1c455
Removed some Compilation-Errors according to API-Changes in the ArtifactDatabase.
Tim Englich <tim.englich@intevation.de>
parents:
219
diff
changeset
|
718 "src/test/ressources/horizontalProfile_instantaneouspoint/horizontalprofile_step_02_advance.xml", describeDocument); |
171
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
719 // Dritter Schritt |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
720 this |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
721 .doNextStep( |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
722 artifact, |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
723 cc, |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
724 "src/test/ressources/horizontalProfile_instantaneouspoint/horizontalprofile_step_03_feed.xml", |
222
3e82b4f1c455
Removed some Compilation-Errors according to API-Changes in the ArtifactDatabase.
Tim Englich <tim.englich@intevation.de>
parents:
219
diff
changeset
|
725 "src/test/ressources/horizontalProfile_instantaneouspoint/horizontalprofile_step_03_advance.xml", describeDocument); |
171
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
726 // Vierter Schritt |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
727 this |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
728 .doNextStep( |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
729 artifact, |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
730 cc, |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
731 "src/test/ressources/horizontalProfile_instantaneouspoint/horizontalprofile_step_04_feed.xml", |
222
3e82b4f1c455
Removed some Compilation-Errors according to API-Changes in the ArtifactDatabase.
Tim Englich <tim.englich@intevation.de>
parents:
219
diff
changeset
|
732 "src/test/ressources/horizontalProfile_instantaneouspoint/horizontalprofile_step_04_advance.xml", describeDocument); |
171
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
733 // F�nfter Schritt |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
734 this |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
735 .doNextStep( |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
736 artifact, |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
737 cc, |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
738 "src/test/ressources/horizontalProfile_instantaneouspoint/horizontalprofile_step_05_feed.xml", |
222
3e82b4f1c455
Removed some Compilation-Errors according to API-Changes in the ArtifactDatabase.
Tim Englich <tim.englich@intevation.de>
parents:
219
diff
changeset
|
739 "src/test/ressources/horizontalProfile_instantaneouspoint/horizontalprofile_step_05_advance.xml", describeDocument); |
171
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
740 |
222
3e82b4f1c455
Removed some Compilation-Errors according to API-Changes in the ArtifactDatabase.
Tim Englich <tim.englich@intevation.de>
parents:
219
diff
changeset
|
741 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
|
742 FileOutputStream fos = null; |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
743 FileOutputStream fos2 = null; |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
744 FileOutputStream fos3 = null; |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
745 try { |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
746 fos = new FileOutputStream( |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
747 "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
|
748 + System.currentTimeMillis() + ".png"); |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
749 fos2 = new FileOutputStream( |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
750 "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
|
751 + System.currentTimeMillis() + ".xml"); |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
752 fos3 = new FileOutputStream( |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
753 "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
|
754 + System.currentTimeMillis() + ".csv"); |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
755 artifact |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
756 .feed( |
177
08b8b79b30ff
Integrated special CSV-Export for HorizontalProfiles
Tim Englich <tim.englich@intevation.de>
parents:
171
diff
changeset
|
757 this.readDocument("src/test/ressources/horizontalProfile_instantaneouspoint/horizontalprofile_step_06_feed.xml"), |
171
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
758 cc); |
177
08b8b79b30ff
Integrated special CSV-Export for HorizontalProfiles
Tim Englich <tim.englich@intevation.de>
parents:
171
diff
changeset
|
759 artifact.out(this.readDocument("src/test/ressources/horizontalProfile_instantaneouspoint/horizontalprofile_step_06_out_statistics.xml"), |
08b8b79b30ff
Integrated special CSV-Export for HorizontalProfiles
Tim Englich <tim.englich@intevation.de>
parents:
171
diff
changeset
|
760 fos2, |
08b8b79b30ff
Integrated special CSV-Export for HorizontalProfiles
Tim Englich <tim.englich@intevation.de>
parents:
171
diff
changeset
|
761 cc); |
08b8b79b30ff
Integrated special CSV-Export for HorizontalProfiles
Tim Englich <tim.englich@intevation.de>
parents:
171
diff
changeset
|
762 artifact.out( |
08b8b79b30ff
Integrated special CSV-Export for HorizontalProfiles
Tim Englich <tim.englich@intevation.de>
parents:
171
diff
changeset
|
763 this.readDocument("src/test/ressources/horizontalProfile_instantaneouspoint/horizontalprofile_step_06_out_chart.xml"), |
08b8b79b30ff
Integrated special CSV-Export for HorizontalProfiles
Tim Englich <tim.englich@intevation.de>
parents:
171
diff
changeset
|
764 fos, |
08b8b79b30ff
Integrated special CSV-Export for HorizontalProfiles
Tim Englich <tim.englich@intevation.de>
parents:
171
diff
changeset
|
765 cc); |
08b8b79b30ff
Integrated special CSV-Export for HorizontalProfiles
Tim Englich <tim.englich@intevation.de>
parents:
171
diff
changeset
|
766 artifact.out(this.readDocument("src/test/ressources/horizontalProfile_instantaneouspoint/horizontalprofile_step_06_out_csv.xml"), |
08b8b79b30ff
Integrated special CSV-Export for HorizontalProfiles
Tim Englich <tim.englich@intevation.de>
parents:
171
diff
changeset
|
767 fos3, |
08b8b79b30ff
Integrated special CSV-Export for HorizontalProfiles
Tim Englich <tim.englich@intevation.de>
parents:
171
diff
changeset
|
768 cc); |
171
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
769 } catch (Exception e) { |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
770 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
|
771 fail(); |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
772 } finally { |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
773 try { |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
774 fos.flush(); |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
775 fos.close(); |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
776 fos2.flush(); |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
777 fos2.close(); |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
778 fos3.flush(); |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
779 fos3.close(); |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
780 } catch (Exception e) { |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
781 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
|
782 } |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
783 } |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
784 } catch (Exception e) { |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
785 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
|
786 fail(); |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
787 } |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
788 } |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
789 |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
790 public void testHorizontalProfileMeshPointArtifact() { |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
791 try { |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
792 log |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
793 .debug("GNVArtifactsTestCase.testHorizontalProfileInstantaneousPointArtifact"); |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
794 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
|
795 ArtifactFactory artifactFactory = this |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
796 .getArtifactFactory(artefactName); |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
797 assertNotNull(artifactFactory); |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
798 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
|
799 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
|
800 "" + 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
|
801 assertNotNull(artifact); |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
802 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
|
803 |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
804 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
|
805 Document describeDocument = this.readDocument("src/test/ressources/horizontalProfile_mesh/horizontalprofile_describe.xml"); |
171
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
806 // Erster Schritt |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
807 this |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
808 .doNextStep( |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
809 artifact, |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
810 cc, |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
811 "src/test/ressources/horizontalProfile_mesh/horizontalprofile_step_01_feed.xml", |
222
3e82b4f1c455
Removed some Compilation-Errors according to API-Changes in the ArtifactDatabase.
Tim Englich <tim.englich@intevation.de>
parents:
219
diff
changeset
|
812 "src/test/ressources/horizontalProfile_mesh/horizontalprofile_step_01_advance.xml", describeDocument); |
171
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
813 |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
814 // Zweiter Schritt |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
815 this |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
816 .doNextStep( |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
817 artifact, |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
818 cc, |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
819 "src/test/ressources/horizontalProfile_mesh/horizontalprofile_step_02_feed.xml", |
222
3e82b4f1c455
Removed some Compilation-Errors according to API-Changes in the ArtifactDatabase.
Tim Englich <tim.englich@intevation.de>
parents:
219
diff
changeset
|
820 "src/test/ressources/horizontalProfile_mesh/horizontalprofile_step_02_advance.xml", describeDocument); |
171
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
821 // Dritter Schritt |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
822 this |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
823 .doNextStep( |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
824 artifact, |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
825 cc, |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
826 "src/test/ressources/horizontalProfile_mesh/horizontalprofile_step_03_feed.xml", |
222
3e82b4f1c455
Removed some Compilation-Errors according to API-Changes in the ArtifactDatabase.
Tim Englich <tim.englich@intevation.de>
parents:
219
diff
changeset
|
827 "src/test/ressources/horizontalProfile_mesh/horizontalprofile_step_03_advance.xml", describeDocument); |
171
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
828 // Vierter Schritt |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
829 this |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
830 .doNextStep( |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
831 artifact, |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
832 cc, |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
833 "src/test/ressources/horizontalProfile_mesh/horizontalprofile_step_04_feed.xml", |
222
3e82b4f1c455
Removed some Compilation-Errors according to API-Changes in the ArtifactDatabase.
Tim Englich <tim.englich@intevation.de>
parents:
219
diff
changeset
|
834 "src/test/ressources/horizontalProfile_mesh/horizontalprofile_step_04_advance.xml", describeDocument); |
171
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
835 // F�nfter Schritt |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
836 this |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
837 .doNextStep( |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
838 artifact, |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
839 cc, |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
840 "src/test/ressources/horizontalProfile_mesh/horizontalprofile_step_05_feed.xml", |
222
3e82b4f1c455
Removed some Compilation-Errors according to API-Changes in the ArtifactDatabase.
Tim Englich <tim.englich@intevation.de>
parents:
219
diff
changeset
|
841 "src/test/ressources/horizontalProfile_mesh/horizontalprofile_step_05_advance.xml", describeDocument); |
171
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
842 |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
843 // Sechster Schritt |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
844 this |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
845 .doNextStep( |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
846 artifact, |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
847 cc, |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
848 "src/test/ressources/horizontalProfile_mesh/horizontalprofile_step_06_feed.xml", |
222
3e82b4f1c455
Removed some Compilation-Errors according to API-Changes in the ArtifactDatabase.
Tim Englich <tim.englich@intevation.de>
parents:
219
diff
changeset
|
849 "src/test/ressources/horizontalProfile_mesh/horizontalprofile_step_06_advance.xml", describeDocument); |
171
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
850 |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
851 // Siebter Schritt |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
852 this |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
853 .doNextStep( |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
854 artifact, |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
855 cc, |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
856 "src/test/ressources/horizontalProfile_mesh/horizontalprofile_step_07_feed.xml", |
222
3e82b4f1c455
Removed some Compilation-Errors according to API-Changes in the ArtifactDatabase.
Tim Englich <tim.englich@intevation.de>
parents:
219
diff
changeset
|
857 "src/test/ressources/horizontalProfile_mesh/horizontalprofile_step_07_advance.xml", describeDocument); |
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
|
858 |
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
|
859 // Achter Schritt |
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
|
860 this |
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
|
861 .doNextStep( |
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
|
862 artifact, |
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
|
863 cc, |
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
|
864 "src/test/ressources/horizontalProfile_mesh/horizontalprofile_step_08_feed.xml", |
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
|
865 "src/test/ressources/horizontalProfile_mesh/horizontalprofile_step_08_advance.xml", describeDocument); |
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
|
866 |
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
|
867 // Neunter Schritt |
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
|
868 this |
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
|
869 .doNextStep( |
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
|
870 artifact, |
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
|
871 cc, |
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
|
872 "src/test/ressources/horizontalProfile_mesh/horizontalprofile_step_09_feed.xml", |
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
|
873 "src/test/ressources/horizontalProfile_mesh/horizontalprofile_step_09_advance.xml", describeDocument); |
171
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
874 |
222
3e82b4f1c455
Removed some Compilation-Errors according to API-Changes in the ArtifactDatabase.
Tim Englich <tim.englich@intevation.de>
parents:
219
diff
changeset
|
875 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
|
876 FileOutputStream fos = null; |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
877 FileOutputStream fos2 = null; |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
878 FileOutputStream fos3 = null; |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
879 try { |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
880 fos = new FileOutputStream( |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
881 "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
|
882 + System.currentTimeMillis() + ".png"); |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
883 fos2 = new FileOutputStream( |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
884 "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
|
885 + System.currentTimeMillis() + ".xml"); |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
886 fos3 = new FileOutputStream( |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
887 "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
|
888 + System.currentTimeMillis() + ".csv"); |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
889 artifact |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
890 .feed( |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
891 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
|
892 .readDocument("src/test/ressources/horizontalProfile_mesh/horizontalprofile_step_10_feed.xml"), |
171
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
893 cc); |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
894 artifact |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
895 .out( |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
896 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
|
897 .readDocument("src/test/ressources/horizontalProfile_mesh/horizontalprofile_step_10_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
|
898 fos2, cc); |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
899 artifact |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
900 .out( |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
901 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
|
902 .readDocument("src/test/ressources/horizontalProfile_mesh/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
|
903 fos, cc); |
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
|
904 artifact.out(this.readDocument("src/test/ressources/horizontalProfile_mesh/horizontalprofile_step_10_out_csv.xml"), |
177
08b8b79b30ff
Integrated special CSV-Export for HorizontalProfiles
Tim Englich <tim.englich@intevation.de>
parents:
171
diff
changeset
|
905 fos3, |
08b8b79b30ff
Integrated special CSV-Export for HorizontalProfiles
Tim Englich <tim.englich@intevation.de>
parents:
171
diff
changeset
|
906 cc); |
171
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
907 } catch (Exception e) { |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
908 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
|
909 fail(); |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
910 } finally { |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
911 try { |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
912 fos.flush(); |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
913 fos.close(); |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
914 fos2.flush(); |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
915 fos2.close(); |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
916 fos3.flush(); |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
917 fos3.close(); |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
918 } catch (Exception e) { |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
919 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
|
920 } |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
921 } |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
922 } catch (Exception e) { |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
923 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
|
924 fail(); |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
925 } |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
926 } |
197
bab92ad1165d
Added the required Classes an Configuration for providing VerticalCrossSections
Tim Englich <tim.englich@intevation.de>
parents:
177
diff
changeset
|
927 |
219
f8cb64d5fe4f
Added the Testcase for Horizontal Cross-Sections
Tim Englich <tim.englich@intevation.de>
parents:
213
diff
changeset
|
928 public void testHorizontalCrossSectionMeshArtifact() { |
f8cb64d5fe4f
Added the Testcase for Horizontal Cross-Sections
Tim Englich <tim.englich@intevation.de>
parents:
213
diff
changeset
|
929 try { |
f8cb64d5fe4f
Added the Testcase for Horizontal Cross-Sections
Tim Englich <tim.englich@intevation.de>
parents:
213
diff
changeset
|
930 log.debug("GNVArtifactsTestCase.testHorizontalCrossSectionMeshArtifact"); |
f8cb64d5fe4f
Added the Testcase for Horizontal Cross-Sections
Tim Englich <tim.englich@intevation.de>
parents:
213
diff
changeset
|
931 String artefactName = "fis_modeldata"; |
f8cb64d5fe4f
Added the Testcase for Horizontal Cross-Sections
Tim Englich <tim.englich@intevation.de>
parents:
213
diff
changeset
|
932 ArtifactFactory artifactFactory = this |
f8cb64d5fe4f
Added the Testcase for Horizontal Cross-Sections
Tim Englich <tim.englich@intevation.de>
parents:
213
diff
changeset
|
933 .getArtifactFactory(artefactName); |
f8cb64d5fe4f
Added the Testcase for Horizontal Cross-Sections
Tim Englich <tim.englich@intevation.de>
parents:
213
diff
changeset
|
934 assertNotNull(artifactFactory); |
f8cb64d5fe4f
Added the Testcase for Horizontal Cross-Sections
Tim Englich <tim.englich@intevation.de>
parents:
213
diff
changeset
|
935 log.debug("HorizontalCrossSectionMesh-ArtifactFactory is available"); |
f8cb64d5fe4f
Added the Testcase for Horizontal Cross-Sections
Tim Englich <tim.englich@intevation.de>
parents:
213
diff
changeset
|
936 Artifact artifact = artifactFactory.createArtifact( |
f8cb64d5fe4f
Added the Testcase for Horizontal Cross-Sections
Tim Englich <tim.englich@intevation.de>
parents:
213
diff
changeset
|
937 "" + System.currentTimeMillis(), bootstrap.getContext()); |
f8cb64d5fe4f
Added the Testcase for Horizontal Cross-Sections
Tim Englich <tim.englich@intevation.de>
parents:
213
diff
changeset
|
938 assertNotNull(artifact); |
f8cb64d5fe4f
Added the Testcase for Horizontal Cross-Sections
Tim Englich <tim.englich@intevation.de>
parents:
213
diff
changeset
|
939 log.debug("HorizontalCrossSectionMesh-Artifact is available"); |
f8cb64d5fe4f
Added the Testcase for Horizontal Cross-Sections
Tim Englich <tim.englich@intevation.de>
parents:
213
diff
changeset
|
940 |
f8cb64d5fe4f
Added the Testcase for Horizontal Cross-Sections
Tim Englich <tim.englich@intevation.de>
parents:
213
diff
changeset
|
941 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
|
942 Document describeDocument = this.readDocument("src/test/ressources/horizontalcrosssection_mesh/horizontalcrosssection_describe.xml"); |
219
f8cb64d5fe4f
Added the Testcase for Horizontal Cross-Sections
Tim Englich <tim.englich@intevation.de>
parents:
213
diff
changeset
|
943 // Erster Schritt |
f8cb64d5fe4f
Added the Testcase for Horizontal Cross-Sections
Tim Englich <tim.englich@intevation.de>
parents:
213
diff
changeset
|
944 this |
f8cb64d5fe4f
Added the Testcase for Horizontal Cross-Sections
Tim Englich <tim.englich@intevation.de>
parents:
213
diff
changeset
|
945 .doNextStep( |
f8cb64d5fe4f
Added the Testcase for Horizontal Cross-Sections
Tim Englich <tim.englich@intevation.de>
parents:
213
diff
changeset
|
946 artifact, |
f8cb64d5fe4f
Added the Testcase for Horizontal Cross-Sections
Tim Englich <tim.englich@intevation.de>
parents:
213
diff
changeset
|
947 cc, |
f8cb64d5fe4f
Added the Testcase for Horizontal Cross-Sections
Tim Englich <tim.englich@intevation.de>
parents:
213
diff
changeset
|
948 "src/test/ressources/horizontalcrosssection_mesh/horizontalcrosssection_step_01_feed.xml", |
222
3e82b4f1c455
Removed some Compilation-Errors according to API-Changes in the ArtifactDatabase.
Tim Englich <tim.englich@intevation.de>
parents:
219
diff
changeset
|
949 "src/test/ressources/horizontalcrosssection_mesh/horizontalcrosssection_step_01_advance.xml", describeDocument); |
219
f8cb64d5fe4f
Added the Testcase for Horizontal Cross-Sections
Tim Englich <tim.englich@intevation.de>
parents:
213
diff
changeset
|
950 |
f8cb64d5fe4f
Added the Testcase for Horizontal Cross-Sections
Tim Englich <tim.englich@intevation.de>
parents:
213
diff
changeset
|
951 // Zweiter Schritt |
f8cb64d5fe4f
Added the Testcase for Horizontal Cross-Sections
Tim Englich <tim.englich@intevation.de>
parents:
213
diff
changeset
|
952 this |
f8cb64d5fe4f
Added the Testcase for Horizontal Cross-Sections
Tim Englich <tim.englich@intevation.de>
parents:
213
diff
changeset
|
953 .doNextStep( |
f8cb64d5fe4f
Added the Testcase for Horizontal Cross-Sections
Tim Englich <tim.englich@intevation.de>
parents:
213
diff
changeset
|
954 artifact, |
f8cb64d5fe4f
Added the Testcase for Horizontal Cross-Sections
Tim Englich <tim.englich@intevation.de>
parents:
213
diff
changeset
|
955 cc, |
f8cb64d5fe4f
Added the Testcase for Horizontal Cross-Sections
Tim Englich <tim.englich@intevation.de>
parents:
213
diff
changeset
|
956 "src/test/ressources/horizontalcrosssection_mesh/horizontalcrosssection_step_02_feed.xml", |
222
3e82b4f1c455
Removed some Compilation-Errors according to API-Changes in the ArtifactDatabase.
Tim Englich <tim.englich@intevation.de>
parents:
219
diff
changeset
|
957 "src/test/ressources/horizontalcrosssection_mesh/horizontalcrosssection_step_02_advance.xml", describeDocument); |
219
f8cb64d5fe4f
Added the Testcase for Horizontal Cross-Sections
Tim Englich <tim.englich@intevation.de>
parents:
213
diff
changeset
|
958 // Dritter Schritt |
f8cb64d5fe4f
Added the Testcase for Horizontal Cross-Sections
Tim Englich <tim.englich@intevation.de>
parents:
213
diff
changeset
|
959 this |
f8cb64d5fe4f
Added the Testcase for Horizontal Cross-Sections
Tim Englich <tim.englich@intevation.de>
parents:
213
diff
changeset
|
960 .doNextStep( |
f8cb64d5fe4f
Added the Testcase for Horizontal Cross-Sections
Tim Englich <tim.englich@intevation.de>
parents:
213
diff
changeset
|
961 artifact, |
f8cb64d5fe4f
Added the Testcase for Horizontal Cross-Sections
Tim Englich <tim.englich@intevation.de>
parents:
213
diff
changeset
|
962 cc, |
f8cb64d5fe4f
Added the Testcase for Horizontal Cross-Sections
Tim Englich <tim.englich@intevation.de>
parents:
213
diff
changeset
|
963 "src/test/ressources/horizontalcrosssection_mesh/horizontalcrosssection_step_03_feed.xml", |
222
3e82b4f1c455
Removed some Compilation-Errors according to API-Changes in the ArtifactDatabase.
Tim Englich <tim.englich@intevation.de>
parents:
219
diff
changeset
|
964 "src/test/ressources/horizontalcrosssection_mesh/horizontalcrosssection_step_03_advance.xml", describeDocument); |
219
f8cb64d5fe4f
Added the Testcase for Horizontal Cross-Sections
Tim Englich <tim.englich@intevation.de>
parents:
213
diff
changeset
|
965 // Vierter Schritt |
f8cb64d5fe4f
Added the Testcase for Horizontal Cross-Sections
Tim Englich <tim.englich@intevation.de>
parents:
213
diff
changeset
|
966 this |
f8cb64d5fe4f
Added the Testcase for Horizontal Cross-Sections
Tim Englich <tim.englich@intevation.de>
parents:
213
diff
changeset
|
967 .doNextStep( |
f8cb64d5fe4f
Added the Testcase for Horizontal Cross-Sections
Tim Englich <tim.englich@intevation.de>
parents:
213
diff
changeset
|
968 artifact, |
f8cb64d5fe4f
Added the Testcase for Horizontal Cross-Sections
Tim Englich <tim.englich@intevation.de>
parents:
213
diff
changeset
|
969 cc, |
f8cb64d5fe4f
Added the Testcase for Horizontal Cross-Sections
Tim Englich <tim.englich@intevation.de>
parents:
213
diff
changeset
|
970 "src/test/ressources/horizontalcrosssection_mesh/horizontalcrosssection_step_04_feed.xml", |
222
3e82b4f1c455
Removed some Compilation-Errors according to API-Changes in the ArtifactDatabase.
Tim Englich <tim.englich@intevation.de>
parents:
219
diff
changeset
|
971 "src/test/ressources/horizontalcrosssection_mesh/horizontalcrosssection_step_04_advance.xml", describeDocument); |
219
f8cb64d5fe4f
Added the Testcase for Horizontal Cross-Sections
Tim Englich <tim.englich@intevation.de>
parents:
213
diff
changeset
|
972 |
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
|
973 // F�nfter Schritt |
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
|
974 this |
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
|
975 .doNextStep( |
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
|
976 artifact, |
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
|
977 cc, |
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
|
978 "src/test/ressources/horizontalcrosssection_mesh/horizontalcrosssection_step_05_feed.xml", |
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
|
979 "src/test/ressources/horizontalcrosssection_mesh/horizontalcrosssection_step_05_advance.xml", describeDocument); |
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
|
980 |
222
3e82b4f1c455
Removed some Compilation-Errors according to API-Changes in the ArtifactDatabase.
Tim Englich <tim.englich@intevation.de>
parents:
219
diff
changeset
|
981 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
|
982 FileOutputStream fos = null; |
f8cb64d5fe4f
Added the Testcase for Horizontal Cross-Sections
Tim Englich <tim.englich@intevation.de>
parents:
213
diff
changeset
|
983 FileOutputStream fos2 = null; |
f8cb64d5fe4f
Added the Testcase for Horizontal Cross-Sections
Tim Englich <tim.englich@intevation.de>
parents:
213
diff
changeset
|
984 FileOutputStream fos3 = null; |
f8cb64d5fe4f
Added the Testcase for Horizontal Cross-Sections
Tim Englich <tim.englich@intevation.de>
parents:
213
diff
changeset
|
985 try { |
f8cb64d5fe4f
Added the Testcase for Horizontal Cross-Sections
Tim Englich <tim.englich@intevation.de>
parents:
213
diff
changeset
|
986 fos = new FileOutputStream( |
f8cb64d5fe4f
Added the Testcase for Horizontal Cross-Sections
Tim Englich <tim.englich@intevation.de>
parents:
213
diff
changeset
|
987 "src/test/results/horizontalcrosssection_mesh" |
f8cb64d5fe4f
Added the Testcase for Horizontal Cross-Sections
Tim Englich <tim.englich@intevation.de>
parents:
213
diff
changeset
|
988 + System.currentTimeMillis() + ".png"); |
f8cb64d5fe4f
Added the Testcase for Horizontal Cross-Sections
Tim Englich <tim.englich@intevation.de>
parents:
213
diff
changeset
|
989 fos2 = new FileOutputStream( |
f8cb64d5fe4f
Added the Testcase for Horizontal Cross-Sections
Tim Englich <tim.englich@intevation.de>
parents:
213
diff
changeset
|
990 "src/test/results/horizontalcrosssection_mesh" |
f8cb64d5fe4f
Added the Testcase for Horizontal Cross-Sections
Tim Englich <tim.englich@intevation.de>
parents:
213
diff
changeset
|
991 + System.currentTimeMillis() + ".xml"); |
f8cb64d5fe4f
Added the Testcase for Horizontal Cross-Sections
Tim Englich <tim.englich@intevation.de>
parents:
213
diff
changeset
|
992 fos3 = new FileOutputStream( |
f8cb64d5fe4f
Added the Testcase for Horizontal Cross-Sections
Tim Englich <tim.englich@intevation.de>
parents:
213
diff
changeset
|
993 "src/test/results/horizontalcrosssection_mesh" |
f8cb64d5fe4f
Added the Testcase for Horizontal Cross-Sections
Tim Englich <tim.englich@intevation.de>
parents:
213
diff
changeset
|
994 + System.currentTimeMillis() + ".csv"); |
f8cb64d5fe4f
Added the Testcase for Horizontal Cross-Sections
Tim Englich <tim.englich@intevation.de>
parents:
213
diff
changeset
|
995 artifact |
f8cb64d5fe4f
Added the Testcase for Horizontal Cross-Sections
Tim Englich <tim.englich@intevation.de>
parents:
213
diff
changeset
|
996 .feed(this.readDocument("src/test/ressources/horizontal" + |
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
|
997 "crosssection_mesh/horizontalcrosssection_step_06_feed.xml"), |
219
f8cb64d5fe4f
Added the Testcase for Horizontal Cross-Sections
Tim Englich <tim.englich@intevation.de>
parents:
213
diff
changeset
|
998 cc); |
f8cb64d5fe4f
Added the Testcase for Horizontal Cross-Sections
Tim Englich <tim.englich@intevation.de>
parents:
213
diff
changeset
|
999 artifact |
f8cb64d5fe4f
Added the Testcase for Horizontal Cross-Sections
Tim Englich <tim.englich@intevation.de>
parents:
213
diff
changeset
|
1000 .out(this.readDocument("src/test/ressources/horizontal" + |
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
|
1001 "crosssection_mesh/horizontalcrosssection_step_06_out_statistics.xml"), |
219
f8cb64d5fe4f
Added the Testcase for Horizontal Cross-Sections
Tim Englich <tim.englich@intevation.de>
parents:
213
diff
changeset
|
1002 fos2, cc); |
f8cb64d5fe4f
Added the Testcase for Horizontal Cross-Sections
Tim Englich <tim.englich@intevation.de>
parents:
213
diff
changeset
|
1003 artifact |
f8cb64d5fe4f
Added the Testcase for Horizontal Cross-Sections
Tim Englich <tim.englich@intevation.de>
parents:
213
diff
changeset
|
1004 .out(this.readDocument("src/test/ressources/horizontal" + |
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
|
1005 "crosssection_mesh/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
|
1006 fos, cc); |
f8cb64d5fe4f
Added the Testcase for Horizontal Cross-Sections
Tim Englich <tim.englich@intevation.de>
parents:
213
diff
changeset
|
1007 artifact.out(this.readDocument("src/test/ressources/horizontal" + |
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
|
1008 "crosssection_mesh/horizontalcrosssection_step_06_out_csv.xml"), |
219
f8cb64d5fe4f
Added the Testcase for Horizontal Cross-Sections
Tim Englich <tim.englich@intevation.de>
parents:
213
diff
changeset
|
1009 fos3, |
f8cb64d5fe4f
Added the Testcase for Horizontal Cross-Sections
Tim Englich <tim.englich@intevation.de>
parents:
213
diff
changeset
|
1010 cc); |
f8cb64d5fe4f
Added the Testcase for Horizontal Cross-Sections
Tim Englich <tim.englich@intevation.de>
parents:
213
diff
changeset
|
1011 } catch (Exception e) { |
f8cb64d5fe4f
Added the Testcase for Horizontal Cross-Sections
Tim Englich <tim.englich@intevation.de>
parents:
213
diff
changeset
|
1012 log.error(e, e); |
f8cb64d5fe4f
Added the Testcase for Horizontal Cross-Sections
Tim Englich <tim.englich@intevation.de>
parents:
213
diff
changeset
|
1013 fail(); |
f8cb64d5fe4f
Added the Testcase for Horizontal Cross-Sections
Tim Englich <tim.englich@intevation.de>
parents:
213
diff
changeset
|
1014 } finally { |
f8cb64d5fe4f
Added the Testcase for Horizontal Cross-Sections
Tim Englich <tim.englich@intevation.de>
parents:
213
diff
changeset
|
1015 try { |
f8cb64d5fe4f
Added the Testcase for Horizontal Cross-Sections
Tim Englich <tim.englich@intevation.de>
parents:
213
diff
changeset
|
1016 fos.flush(); |
f8cb64d5fe4f
Added the Testcase for Horizontal Cross-Sections
Tim Englich <tim.englich@intevation.de>
parents:
213
diff
changeset
|
1017 fos.close(); |
f8cb64d5fe4f
Added the Testcase for Horizontal Cross-Sections
Tim Englich <tim.englich@intevation.de>
parents:
213
diff
changeset
|
1018 fos2.flush(); |
f8cb64d5fe4f
Added the Testcase for Horizontal Cross-Sections
Tim Englich <tim.englich@intevation.de>
parents:
213
diff
changeset
|
1019 fos2.close(); |
f8cb64d5fe4f
Added the Testcase for Horizontal Cross-Sections
Tim Englich <tim.englich@intevation.de>
parents:
213
diff
changeset
|
1020 fos3.flush(); |
f8cb64d5fe4f
Added the Testcase for Horizontal Cross-Sections
Tim Englich <tim.englich@intevation.de>
parents:
213
diff
changeset
|
1021 fos3.close(); |
f8cb64d5fe4f
Added the Testcase for Horizontal Cross-Sections
Tim Englich <tim.englich@intevation.de>
parents:
213
diff
changeset
|
1022 } catch (Exception e) { |
f8cb64d5fe4f
Added the Testcase for Horizontal Cross-Sections
Tim Englich <tim.englich@intevation.de>
parents:
213
diff
changeset
|
1023 log.error(e, e); |
f8cb64d5fe4f
Added the Testcase for Horizontal Cross-Sections
Tim Englich <tim.englich@intevation.de>
parents:
213
diff
changeset
|
1024 } |
f8cb64d5fe4f
Added the Testcase for Horizontal Cross-Sections
Tim Englich <tim.englich@intevation.de>
parents:
213
diff
changeset
|
1025 } |
f8cb64d5fe4f
Added the Testcase for Horizontal Cross-Sections
Tim Englich <tim.englich@intevation.de>
parents:
213
diff
changeset
|
1026 } catch (Exception e) { |
f8cb64d5fe4f
Added the Testcase for Horizontal Cross-Sections
Tim Englich <tim.englich@intevation.de>
parents:
213
diff
changeset
|
1027 log.error(e, e); |
f8cb64d5fe4f
Added the Testcase for Horizontal Cross-Sections
Tim Englich <tim.englich@intevation.de>
parents:
213
diff
changeset
|
1028 fail(); |
f8cb64d5fe4f
Added the Testcase for Horizontal Cross-Sections
Tim Englich <tim.englich@intevation.de>
parents:
213
diff
changeset
|
1029 } |
f8cb64d5fe4f
Added the Testcase for Horizontal Cross-Sections
Tim Englich <tim.englich@intevation.de>
parents:
213
diff
changeset
|
1030 } |
f8cb64d5fe4f
Added the Testcase for Horizontal Cross-Sections
Tim Englich <tim.englich@intevation.de>
parents:
213
diff
changeset
|
1031 |
197
bab92ad1165d
Added the required Classes an Configuration for providing VerticalCrossSections
Tim Englich <tim.englich@intevation.de>
parents:
177
diff
changeset
|
1032 public void testVerticalCrossSectionMeshArtifact() { |
bab92ad1165d
Added the required Classes an Configuration for providing VerticalCrossSections
Tim Englich <tim.englich@intevation.de>
parents:
177
diff
changeset
|
1033 try { |
bab92ad1165d
Added the required Classes an Configuration for providing VerticalCrossSections
Tim Englich <tim.englich@intevation.de>
parents:
177
diff
changeset
|
1034 log.debug("GNVArtifactsTestCase.testHVerticalCrossSectionMeshArtifact"); |
bab92ad1165d
Added the required Classes an Configuration for providing VerticalCrossSections
Tim Englich <tim.englich@intevation.de>
parents:
177
diff
changeset
|
1035 String artefactName = "fis_modeldata"; |
bab92ad1165d
Added the required Classes an Configuration for providing VerticalCrossSections
Tim Englich <tim.englich@intevation.de>
parents:
177
diff
changeset
|
1036 ArtifactFactory artifactFactory = this |
bab92ad1165d
Added the required Classes an Configuration for providing VerticalCrossSections
Tim Englich <tim.englich@intevation.de>
parents:
177
diff
changeset
|
1037 .getArtifactFactory(artefactName); |
bab92ad1165d
Added the required Classes an Configuration for providing VerticalCrossSections
Tim Englich <tim.englich@intevation.de>
parents:
177
diff
changeset
|
1038 assertNotNull(artifactFactory); |
bab92ad1165d
Added the required Classes an Configuration for providing VerticalCrossSections
Tim Englich <tim.englich@intevation.de>
parents:
177
diff
changeset
|
1039 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
|
1040 Artifact artifact = artifactFactory.createArtifact( |
bab92ad1165d
Added the required Classes an Configuration for providing VerticalCrossSections
Tim Englich <tim.englich@intevation.de>
parents:
177
diff
changeset
|
1041 "" + System.currentTimeMillis(), bootstrap.getContext()); |
bab92ad1165d
Added the required Classes an Configuration for providing VerticalCrossSections
Tim Englich <tim.englich@intevation.de>
parents:
177
diff
changeset
|
1042 assertNotNull(artifact); |
bab92ad1165d
Added the required Classes an Configuration for providing VerticalCrossSections
Tim Englich <tim.englich@intevation.de>
parents:
177
diff
changeset
|
1043 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
|
1044 |
bab92ad1165d
Added the required Classes an Configuration for providing VerticalCrossSections
Tim Englich <tim.englich@intevation.de>
parents:
177
diff
changeset
|
1045 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
|
1046 Document describeDocument = this.readDocument("src/test/ressources/verticalcrosssection_mesh/verticalcrosssection_describe.xml"); |
197
bab92ad1165d
Added the required Classes an Configuration for providing VerticalCrossSections
Tim Englich <tim.englich@intevation.de>
parents:
177
diff
changeset
|
1047 // Erster Schritt |
bab92ad1165d
Added the required Classes an Configuration for providing VerticalCrossSections
Tim Englich <tim.englich@intevation.de>
parents:
177
diff
changeset
|
1048 this |
bab92ad1165d
Added the required Classes an Configuration for providing VerticalCrossSections
Tim Englich <tim.englich@intevation.de>
parents:
177
diff
changeset
|
1049 .doNextStep( |
bab92ad1165d
Added the required Classes an Configuration for providing VerticalCrossSections
Tim Englich <tim.englich@intevation.de>
parents:
177
diff
changeset
|
1050 artifact, |
bab92ad1165d
Added the required Classes an Configuration for providing VerticalCrossSections
Tim Englich <tim.englich@intevation.de>
parents:
177
diff
changeset
|
1051 cc, |
bab92ad1165d
Added the required Classes an Configuration for providing VerticalCrossSections
Tim Englich <tim.englich@intevation.de>
parents:
177
diff
changeset
|
1052 "src/test/ressources/verticalcrosssection_mesh/verticalcrosssection_step_01_feed.xml", |
222
3e82b4f1c455
Removed some Compilation-Errors according to API-Changes in the ArtifactDatabase.
Tim Englich <tim.englich@intevation.de>
parents:
219
diff
changeset
|
1053 "src/test/ressources/verticalcrosssection_mesh/verticalcrosssection_step_01_advance.xml", describeDocument); |
197
bab92ad1165d
Added the required Classes an Configuration for providing VerticalCrossSections
Tim Englich <tim.englich@intevation.de>
parents:
177
diff
changeset
|
1054 |
bab92ad1165d
Added the required Classes an Configuration for providing VerticalCrossSections
Tim Englich <tim.englich@intevation.de>
parents:
177
diff
changeset
|
1055 // Zweiter Schritt |
bab92ad1165d
Added the required Classes an Configuration for providing VerticalCrossSections
Tim Englich <tim.englich@intevation.de>
parents:
177
diff
changeset
|
1056 this |
bab92ad1165d
Added the required Classes an Configuration for providing VerticalCrossSections
Tim Englich <tim.englich@intevation.de>
parents:
177
diff
changeset
|
1057 .doNextStep( |
bab92ad1165d
Added the required Classes an Configuration for providing VerticalCrossSections
Tim Englich <tim.englich@intevation.de>
parents:
177
diff
changeset
|
1058 artifact, |
bab92ad1165d
Added the required Classes an Configuration for providing VerticalCrossSections
Tim Englich <tim.englich@intevation.de>
parents:
177
diff
changeset
|
1059 cc, |
bab92ad1165d
Added the required Classes an Configuration for providing VerticalCrossSections
Tim Englich <tim.englich@intevation.de>
parents:
177
diff
changeset
|
1060 "src/test/ressources/verticalcrosssection_mesh/verticalcrosssection_step_02_feed.xml", |
222
3e82b4f1c455
Removed some Compilation-Errors according to API-Changes in the ArtifactDatabase.
Tim Englich <tim.englich@intevation.de>
parents:
219
diff
changeset
|
1061 "src/test/ressources/verticalcrosssection_mesh/verticalcrosssection_step_02_advance.xml", describeDocument); |
197
bab92ad1165d
Added the required Classes an Configuration for providing VerticalCrossSections
Tim Englich <tim.englich@intevation.de>
parents:
177
diff
changeset
|
1062 // Dritter Schritt |
bab92ad1165d
Added the required Classes an Configuration for providing VerticalCrossSections
Tim Englich <tim.englich@intevation.de>
parents:
177
diff
changeset
|
1063 this |
bab92ad1165d
Added the required Classes an Configuration for providing VerticalCrossSections
Tim Englich <tim.englich@intevation.de>
parents:
177
diff
changeset
|
1064 .doNextStep( |
bab92ad1165d
Added the required Classes an Configuration for providing VerticalCrossSections
Tim Englich <tim.englich@intevation.de>
parents:
177
diff
changeset
|
1065 artifact, |
bab92ad1165d
Added the required Classes an Configuration for providing VerticalCrossSections
Tim Englich <tim.englich@intevation.de>
parents:
177
diff
changeset
|
1066 cc, |
bab92ad1165d
Added the required Classes an Configuration for providing VerticalCrossSections
Tim Englich <tim.englich@intevation.de>
parents:
177
diff
changeset
|
1067 "src/test/ressources/verticalcrosssection_mesh/verticalcrosssection_step_03_feed.xml", |
222
3e82b4f1c455
Removed some Compilation-Errors according to API-Changes in the ArtifactDatabase.
Tim Englich <tim.englich@intevation.de>
parents:
219
diff
changeset
|
1068 "src/test/ressources/verticalcrosssection_mesh/verticalcrosssection_step_03_advance.xml", describeDocument); |
197
bab92ad1165d
Added the required Classes an Configuration for providing VerticalCrossSections
Tim Englich <tim.englich@intevation.de>
parents:
177
diff
changeset
|
1069 // Vierter Schritt |
bab92ad1165d
Added the required Classes an Configuration for providing VerticalCrossSections
Tim Englich <tim.englich@intevation.de>
parents:
177
diff
changeset
|
1070 this |
bab92ad1165d
Added the required Classes an Configuration for providing VerticalCrossSections
Tim Englich <tim.englich@intevation.de>
parents:
177
diff
changeset
|
1071 .doNextStep( |
bab92ad1165d
Added the required Classes an Configuration for providing VerticalCrossSections
Tim Englich <tim.englich@intevation.de>
parents:
177
diff
changeset
|
1072 artifact, |
bab92ad1165d
Added the required Classes an Configuration for providing VerticalCrossSections
Tim Englich <tim.englich@intevation.de>
parents:
177
diff
changeset
|
1073 cc, |
bab92ad1165d
Added the required Classes an Configuration for providing VerticalCrossSections
Tim Englich <tim.englich@intevation.de>
parents:
177
diff
changeset
|
1074 "src/test/ressources/verticalcrosssection_mesh/verticalcrosssection_step_04_feed.xml", |
222
3e82b4f1c455
Removed some Compilation-Errors according to API-Changes in the ArtifactDatabase.
Tim Englich <tim.englich@intevation.de>
parents:
219
diff
changeset
|
1075 "src/test/ressources/verticalcrosssection_mesh/verticalcrosssection_step_04_advance.xml", describeDocument); |
197
bab92ad1165d
Added the required Classes an Configuration for providing VerticalCrossSections
Tim Englich <tim.englich@intevation.de>
parents:
177
diff
changeset
|
1076 // F�nfter Schritt |
bab92ad1165d
Added the required Classes an Configuration for providing VerticalCrossSections
Tim Englich <tim.englich@intevation.de>
parents:
177
diff
changeset
|
1077 this |
bab92ad1165d
Added the required Classes an Configuration for providing VerticalCrossSections
Tim Englich <tim.englich@intevation.de>
parents:
177
diff
changeset
|
1078 .doNextStep( |
bab92ad1165d
Added the required Classes an Configuration for providing VerticalCrossSections
Tim Englich <tim.englich@intevation.de>
parents:
177
diff
changeset
|
1079 artifact, |
bab92ad1165d
Added the required Classes an Configuration for providing VerticalCrossSections
Tim Englich <tim.englich@intevation.de>
parents:
177
diff
changeset
|
1080 cc, |
bab92ad1165d
Added the required Classes an Configuration for providing VerticalCrossSections
Tim Englich <tim.englich@intevation.de>
parents:
177
diff
changeset
|
1081 "src/test/ressources/verticalcrosssection_mesh/verticalcrosssection_step_05_feed.xml", |
222
3e82b4f1c455
Removed some Compilation-Errors according to API-Changes in the ArtifactDatabase.
Tim Englich <tim.englich@intevation.de>
parents:
219
diff
changeset
|
1082 "src/test/ressources/verticalcrosssection_mesh/verticalcrosssection_step_05_advance.xml", describeDocument); |
197
bab92ad1165d
Added the required Classes an Configuration for providing VerticalCrossSections
Tim Englich <tim.englich@intevation.de>
parents:
177
diff
changeset
|
1083 |
bab92ad1165d
Added the required Classes an Configuration for providing VerticalCrossSections
Tim Englich <tim.englich@intevation.de>
parents:
177
diff
changeset
|
1084 // Sechster Schritt |
bab92ad1165d
Added the required Classes an Configuration for providing VerticalCrossSections
Tim Englich <tim.englich@intevation.de>
parents:
177
diff
changeset
|
1085 this |
bab92ad1165d
Added the required Classes an Configuration for providing VerticalCrossSections
Tim Englich <tim.englich@intevation.de>
parents:
177
diff
changeset
|
1086 .doNextStep( |
bab92ad1165d
Added the required Classes an Configuration for providing VerticalCrossSections
Tim Englich <tim.englich@intevation.de>
parents:
177
diff
changeset
|
1087 artifact, |
bab92ad1165d
Added the required Classes an Configuration for providing VerticalCrossSections
Tim Englich <tim.englich@intevation.de>
parents:
177
diff
changeset
|
1088 cc, |
bab92ad1165d
Added the required Classes an Configuration for providing VerticalCrossSections
Tim Englich <tim.englich@intevation.de>
parents:
177
diff
changeset
|
1089 "src/test/ressources/verticalcrosssection_mesh/verticalcrosssection_step_06_feed.xml", |
222
3e82b4f1c455
Removed some Compilation-Errors according to API-Changes in the ArtifactDatabase.
Tim Englich <tim.englich@intevation.de>
parents:
219
diff
changeset
|
1090 "src/test/ressources/verticalcrosssection_mesh/verticalcrosssection_step_06_advance.xml", describeDocument); |
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
|
1091 // Siebter Schritt |
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
|
1092 this |
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
|
1093 .doNextStep( |
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
|
1094 artifact, |
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
|
1095 cc, |
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
|
1096 "src/test/ressources/verticalcrosssection_mesh/verticalcrosssection_step_07_feed.xml", |
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
|
1097 "src/test/ressources/verticalcrosssection_mesh/verticalcrosssection_step_07_advance.xml", describeDocument); |
197
bab92ad1165d
Added the required Classes an Configuration for providing VerticalCrossSections
Tim Englich <tim.englich@intevation.de>
parents:
177
diff
changeset
|
1098 |
222
3e82b4f1c455
Removed some Compilation-Errors according to API-Changes in the ArtifactDatabase.
Tim Englich <tim.englich@intevation.de>
parents:
219
diff
changeset
|
1099 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
|
1100 FileOutputStream fos = null; |
bab92ad1165d
Added the required Classes an Configuration for providing VerticalCrossSections
Tim Englich <tim.englich@intevation.de>
parents:
177
diff
changeset
|
1101 FileOutputStream fos2 = null; |
bab92ad1165d
Added the required Classes an Configuration for providing VerticalCrossSections
Tim Englich <tim.englich@intevation.de>
parents:
177
diff
changeset
|
1102 FileOutputStream fos3 = null; |
bab92ad1165d
Added the required Classes an Configuration for providing VerticalCrossSections
Tim Englich <tim.englich@intevation.de>
parents:
177
diff
changeset
|
1103 try { |
bab92ad1165d
Added the required Classes an Configuration for providing VerticalCrossSections
Tim Englich <tim.englich@intevation.de>
parents:
177
diff
changeset
|
1104 fos = new FileOutputStream( |
bab92ad1165d
Added the required Classes an Configuration for providing VerticalCrossSections
Tim Englich <tim.englich@intevation.de>
parents:
177
diff
changeset
|
1105 "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
|
1106 + System.currentTimeMillis() + ".png"); |
bab92ad1165d
Added the required Classes an Configuration for providing VerticalCrossSections
Tim Englich <tim.englich@intevation.de>
parents:
177
diff
changeset
|
1107 fos2 = new FileOutputStream( |
bab92ad1165d
Added the required Classes an Configuration for providing VerticalCrossSections
Tim Englich <tim.englich@intevation.de>
parents:
177
diff
changeset
|
1108 "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
|
1109 + System.currentTimeMillis() + ".xml"); |
bab92ad1165d
Added the required Classes an Configuration for providing VerticalCrossSections
Tim Englich <tim.englich@intevation.de>
parents:
177
diff
changeset
|
1110 fos3 = new FileOutputStream( |
bab92ad1165d
Added the required Classes an Configuration for providing VerticalCrossSections
Tim Englich <tim.englich@intevation.de>
parents:
177
diff
changeset
|
1111 "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
|
1112 + System.currentTimeMillis() + ".csv"); |
bab92ad1165d
Added the required Classes an Configuration for providing VerticalCrossSections
Tim Englich <tim.englich@intevation.de>
parents:
177
diff
changeset
|
1113 artifact |
bab92ad1165d
Added the required Classes an Configuration for providing VerticalCrossSections
Tim Englich <tim.englich@intevation.de>
parents:
177
diff
changeset
|
1114 .feed( |
bab92ad1165d
Added the required Classes an Configuration for providing VerticalCrossSections
Tim Englich <tim.englich@intevation.de>
parents:
177
diff
changeset
|
1115 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
|
1116 .readDocument("src/test/ressources/verticalcrosssection_mesh/verticalcrosssection_step_08_feed.xml"), |
197
bab92ad1165d
Added the required Classes an Configuration for providing VerticalCrossSections
Tim Englich <tim.englich@intevation.de>
parents:
177
diff
changeset
|
1117 cc); |
bab92ad1165d
Added the required Classes an Configuration for providing VerticalCrossSections
Tim Englich <tim.englich@intevation.de>
parents:
177
diff
changeset
|
1118 artifact |
bab92ad1165d
Added the required Classes an Configuration for providing VerticalCrossSections
Tim Englich <tim.englich@intevation.de>
parents:
177
diff
changeset
|
1119 .out( |
bab92ad1165d
Added the required Classes an Configuration for providing VerticalCrossSections
Tim Englich <tim.englich@intevation.de>
parents:
177
diff
changeset
|
1120 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
|
1121 .readDocument("src/test/ressources/verticalcrosssection_mesh/verticalcrosssection_step_08_out_statistics.xml"), |
197
bab92ad1165d
Added the required Classes an Configuration for providing VerticalCrossSections
Tim Englich <tim.englich@intevation.de>
parents:
177
diff
changeset
|
1122 fos2, cc); |
bab92ad1165d
Added the required Classes an Configuration for providing VerticalCrossSections
Tim Englich <tim.englich@intevation.de>
parents:
177
diff
changeset
|
1123 artifact |
bab92ad1165d
Added the required Classes an Configuration for providing VerticalCrossSections
Tim Englich <tim.englich@intevation.de>
parents:
177
diff
changeset
|
1124 .out( |
bab92ad1165d
Added the required Classes an Configuration for providing VerticalCrossSections
Tim Englich <tim.englich@intevation.de>
parents:
177
diff
changeset
|
1125 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
|
1126 .readDocument("src/test/ressources/verticalcrosssection_mesh/verticalcrosssection_step_08_out_chart.xml"), |
197
bab92ad1165d
Added the required Classes an Configuration for providing VerticalCrossSections
Tim Englich <tim.englich@intevation.de>
parents:
177
diff
changeset
|
1127 fos, cc); |
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
|
1128 artifact.out(this.readDocument("src/test/ressources/verticalcrosssection_mesh/verticalcrosssection_step_08_out_csv.xml"), |
197
bab92ad1165d
Added the required Classes an Configuration for providing VerticalCrossSections
Tim Englich <tim.englich@intevation.de>
parents:
177
diff
changeset
|
1129 fos3, |
bab92ad1165d
Added the required Classes an Configuration for providing VerticalCrossSections
Tim Englich <tim.englich@intevation.de>
parents:
177
diff
changeset
|
1130 cc); |
bab92ad1165d
Added the required Classes an Configuration for providing VerticalCrossSections
Tim Englich <tim.englich@intevation.de>
parents:
177
diff
changeset
|
1131 } catch (Exception e) { |
bab92ad1165d
Added the required Classes an Configuration for providing VerticalCrossSections
Tim Englich <tim.englich@intevation.de>
parents:
177
diff
changeset
|
1132 log.error(e, e); |
bab92ad1165d
Added the required Classes an Configuration for providing VerticalCrossSections
Tim Englich <tim.englich@intevation.de>
parents:
177
diff
changeset
|
1133 fail(); |
bab92ad1165d
Added the required Classes an Configuration for providing VerticalCrossSections
Tim Englich <tim.englich@intevation.de>
parents:
177
diff
changeset
|
1134 } finally { |
bab92ad1165d
Added the required Classes an Configuration for providing VerticalCrossSections
Tim Englich <tim.englich@intevation.de>
parents:
177
diff
changeset
|
1135 try { |
bab92ad1165d
Added the required Classes an Configuration for providing VerticalCrossSections
Tim Englich <tim.englich@intevation.de>
parents:
177
diff
changeset
|
1136 fos.flush(); |
bab92ad1165d
Added the required Classes an Configuration for providing VerticalCrossSections
Tim Englich <tim.englich@intevation.de>
parents:
177
diff
changeset
|
1137 fos.close(); |
bab92ad1165d
Added the required Classes an Configuration for providing VerticalCrossSections
Tim Englich <tim.englich@intevation.de>
parents:
177
diff
changeset
|
1138 fos2.flush(); |
bab92ad1165d
Added the required Classes an Configuration for providing VerticalCrossSections
Tim Englich <tim.englich@intevation.de>
parents:
177
diff
changeset
|
1139 fos2.close(); |
bab92ad1165d
Added the required Classes an Configuration for providing VerticalCrossSections
Tim Englich <tim.englich@intevation.de>
parents:
177
diff
changeset
|
1140 fos3.flush(); |
bab92ad1165d
Added the required Classes an Configuration for providing VerticalCrossSections
Tim Englich <tim.englich@intevation.de>
parents:
177
diff
changeset
|
1141 fos3.close(); |
bab92ad1165d
Added the required Classes an Configuration for providing VerticalCrossSections
Tim Englich <tim.englich@intevation.de>
parents:
177
diff
changeset
|
1142 } catch (Exception e) { |
bab92ad1165d
Added the required Classes an Configuration for providing VerticalCrossSections
Tim Englich <tim.englich@intevation.de>
parents:
177
diff
changeset
|
1143 log.error(e, e); |
bab92ad1165d
Added the required Classes an Configuration for providing VerticalCrossSections
Tim Englich <tim.englich@intevation.de>
parents:
177
diff
changeset
|
1144 } |
bab92ad1165d
Added the required Classes an Configuration for providing VerticalCrossSections
Tim Englich <tim.englich@intevation.de>
parents:
177
diff
changeset
|
1145 } |
bab92ad1165d
Added the required Classes an Configuration for providing VerticalCrossSections
Tim Englich <tim.englich@intevation.de>
parents:
177
diff
changeset
|
1146 } catch (Exception e) { |
bab92ad1165d
Added the required Classes an Configuration for providing VerticalCrossSections
Tim Englich <tim.englich@intevation.de>
parents:
177
diff
changeset
|
1147 log.error(e, e); |
bab92ad1165d
Added the required Classes an Configuration for providing VerticalCrossSections
Tim Englich <tim.englich@intevation.de>
parents:
177
diff
changeset
|
1148 fail(); |
bab92ad1165d
Added the required Classes an Configuration for providing VerticalCrossSections
Tim Englich <tim.englich@intevation.de>
parents:
177
diff
changeset
|
1149 } |
bab92ad1165d
Added the required Classes an Configuration for providing VerticalCrossSections
Tim Englich <tim.englich@intevation.de>
parents:
177
diff
changeset
|
1150 } |
171
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
1151 |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
1152 protected void createFile(byte[] content, String fileName) { |
52
4d6a82b96059
First Implementation of the GNV-Artifacts
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
1153 try { |
69
f24c825144bc
TestCase Refactored to the new Folder-Based Configuration.
Tim Englich <tim.englich@intevation.de>
parents:
62
diff
changeset
|
1154 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
|
1155 ByteArrayInputStream bis = new ByteArrayInputStream(content); |
f24c825144bc
TestCase Refactored to the new Folder-Based Configuration.
Tim Englich <tim.englich@intevation.de>
parents:
62
diff
changeset
|
1156 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
|
1157 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
|
1158 fos.write(buf); |
69
f24c825144bc
TestCase Refactored to the new Folder-Based Configuration.
Tim Englich <tim.englich@intevation.de>
parents:
62
diff
changeset
|
1159 } |
f24c825144bc
TestCase Refactored to the new Folder-Based Configuration.
Tim Englich <tim.englich@intevation.de>
parents:
62
diff
changeset
|
1160 fos.flush(); |
f24c825144bc
TestCase Refactored to the new Folder-Based Configuration.
Tim Englich <tim.englich@intevation.de>
parents:
62
diff
changeset
|
1161 fos.close(); |
f24c825144bc
TestCase Refactored to the new Folder-Based Configuration.
Tim Englich <tim.englich@intevation.de>
parents:
62
diff
changeset
|
1162 } 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
|
1163 log.error(e, e); |
69
f24c825144bc
TestCase Refactored to the new Folder-Based Configuration.
Tim Englich <tim.englich@intevation.de>
parents:
62
diff
changeset
|
1164 } 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
|
1165 log.error(e, e); |
52
4d6a82b96059
First Implementation of the GNV-Artifacts
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
1166 } |
4d6a82b96059
First Implementation of the GNV-Artifacts
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
1167 } |
4d6a82b96059
First Implementation of the GNV-Artifacts
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
1168 |
4d6a82b96059
First Implementation of the GNV-Artifacts
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
1169 /** |
4d6a82b96059
First Implementation of the GNV-Artifacts
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
1170 * @param artefactName |
4d6a82b96059
First Implementation of the GNV-Artifacts
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
1171 */ |
171
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
1172 private ArtifactFactory getArtifactFactory(String artefactName) { |
52
4d6a82b96059
First Implementation of the GNV-Artifacts
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
1173 log.debug("GNVArtifactsTestCase.getArtifactFactory"); |
4d6a82b96059
First Implementation of the GNV-Artifacts
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
1174 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
|
1175 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
|
1176 if (artifactFactories[i].getName().equals(artefactName)) { |
52
4d6a82b96059
First Implementation of the GNV-Artifacts
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
1177 log.debug("ArtifactFactory wurde gefunden."); |
4d6a82b96059
First Implementation of the GNV-Artifacts
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
1178 return artifactFactories[i]; |
4d6a82b96059
First Implementation of the GNV-Artifacts
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
1179 } |
4d6a82b96059
First Implementation of the GNV-Artifacts
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
1180 } |
4d6a82b96059
First Implementation of the GNV-Artifacts
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
1181 return null; |
4d6a82b96059
First Implementation of the GNV-Artifacts
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
1182 } |
171
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
1183 |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
1184 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
|
1185 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
|
1186 } |
171
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
1187 |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
1188 protected Document readDocument(String fileName) { |
58
f31343d80d53
Artifact.advance initial implementiert
Tim Englich <tim.englich@intevation.de>
parents:
54
diff
changeset
|
1189 Document returnValue = null; |
f31343d80d53
Artifact.advance initial implementiert
Tim Englich <tim.englich@intevation.de>
parents:
54
diff
changeset
|
1190 try { |
171
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
1191 DocumentBuilderFactory docBuilderFactory = DocumentBuilderFactory |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
1192 .newInstance(); |
58
f31343d80d53
Artifact.advance initial implementiert
Tim Englich <tim.englich@intevation.de>
parents:
54
diff
changeset
|
1193 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
|
1194 returnValue = docBuilder.parse(new File(fileName)); |
58
f31343d80d53
Artifact.advance initial implementiert
Tim Englich <tim.englich@intevation.de>
parents:
54
diff
changeset
|
1195 } 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
|
1196 log.error(e, e); |
58
f31343d80d53
Artifact.advance initial implementiert
Tim Englich <tim.englich@intevation.de>
parents:
54
diff
changeset
|
1197 } 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
|
1198 log.error(e, e); |
58
f31343d80d53
Artifact.advance initial implementiert
Tim Englich <tim.englich@intevation.de>
parents:
54
diff
changeset
|
1199 } 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
|
1200 log.error(e, e); |
58
f31343d80d53
Artifact.advance initial implementiert
Tim Englich <tim.englich@intevation.de>
parents:
54
diff
changeset
|
1201 } |
f31343d80d53
Artifact.advance initial implementiert
Tim Englich <tim.englich@intevation.de>
parents:
54
diff
changeset
|
1202 return returnValue; |
f31343d80d53
Artifact.advance initial implementiert
Tim Englich <tim.englich@intevation.de>
parents:
54
diff
changeset
|
1203 } |
52
4d6a82b96059
First Implementation of the GNV-Artifacts
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
1204 |
171
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
1205 private void check4ExceptionReport(Document document) throws Exception { |
106
10d9a440f52e
ExceptionTest for Responsdocuments added.
Tim Englich <tim.englich@intevation.de>
parents:
105
diff
changeset
|
1206 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
|
1207 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
|
1208 "/exceptionreport/exception"); |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
1209 if (message != null) { |
106
10d9a440f52e
ExceptionTest for Responsdocuments added.
Tim Englich <tim.englich@intevation.de>
parents:
105
diff
changeset
|
1210 throw new Exception(message); |
10d9a440f52e
ExceptionTest for Responsdocuments added.
Tim Englich <tim.englich@intevation.de>
parents:
105
diff
changeset
|
1211 } |
10d9a440f52e
ExceptionTest for Responsdocuments added.
Tim Englich <tim.englich@intevation.de>
parents:
105
diff
changeset
|
1212 } |
52
4d6a82b96059
First Implementation of the GNV-Artifacts
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
1213 } |