Mercurial > dive4elements > gnv-client
comparison gnv-artifacts/src/test/java/de/intevation/gnv/artifacts/MeshHorizontalCrossSectionTestCase.java @ 485:4939236c2dc9
Fixed Compilation and Runtimeerrors in Unittests.
gnv-artifacts/trunk@560 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Tim Englich <tim.englich@intevation.de> |
---|---|
date | Mon, 18 Jan 2010 11:26:51 +0000 |
parents | bdbca6022cf5 |
children | b8ba642b6866 |
comparison
equal
deleted
inserted
replaced
484:823e4f808418 | 485:4939236c2dc9 |
---|---|
50 Artifact artifact = artifactFactory.createArtifact( | 50 Artifact artifact = artifactFactory.createArtifact( |
51 "" + System.currentTimeMillis(), bootstrap.getContext()); | 51 "" + System.currentTimeMillis(), bootstrap.getContext()); |
52 assertNotNull(artifact); | 52 assertNotNull(artifact); |
53 log.debug("HorizontalCrossSectionMesh-Artifact is available"); | 53 log.debug("HorizontalCrossSectionMesh-Artifact is available"); |
54 | 54 |
55 CallContext cc = createCallContext(); | 55 CallContext cc = createCallContext(artifactFactory); |
56 Document describeDocument = this.readDocument("src/test/ressources/horizontalcrosssection_mesh/horizontalcrosssection_describe.xml"); | 56 Document describeDocument = this.readDocument("src/test/ressources/horizontalcrosssection_mesh/horizontalcrosssection_describe.xml"); |
57 int steps = 7; | 57 int steps = 7; |
58 | 58 |
59 for (int i = 1; i <= steps; i++){ | 59 for (int i = 1; i <= steps; i++){ |
60 this.doNextStep( | 60 this.doNextStep( |
68 } | 68 } |
69 | 69 |
70 Document outputData = artifact.describe(describeDocument,cc); | 70 Document outputData = artifact.describe(describeDocument,cc); |
71 FileOutputStream fos = null; | 71 FileOutputStream fos = null; |
72 FileOutputStream fos2 = null; | 72 FileOutputStream fos2 = null; |
73 FileOutputStream fos3 = null; | |
74 try { | 73 try { |
75 fos = new FileOutputStream( | 74 fos = new FileOutputStream( |
76 "src/test/results/horizontalcrosssection_mesh" | 75 "src/test/results/horizontalcrosssection_mesh" |
77 + System.currentTimeMillis() + ".png"); | 76 + System.currentTimeMillis() + ".zip"); |
78 | |
79 fos2 = new FileOutputStream( | 77 fos2 = new FileOutputStream( |
80 "src/test/results/horizontalcrosssection_mesh" | 78 "src/test/results/horizontalcrosssection_mesh" |
81 + System.currentTimeMillis() + ".csv"); | 79 + System.currentTimeMillis() + ".txt"); |
82 fos3 = new FileOutputStream( | |
83 "src/test/results/horizontalcrosssection_mesh" | |
84 + System.currentTimeMillis() + ".odv"); | |
85 artifact.out(this.readDocument("src/test/ressources/" + | 80 artifact.out(this.readDocument("src/test/ressources/" + |
86 "horizontalcrosssection_mesh/" + | 81 "horizontalcrosssection_mesh/" + |
87 "horizontalcrosssection_step_07_out_chart.xml"), | 82 "horizontalcrosssection_step_07_out_zip.xml"), |
88 fos, cc); | 83 fos, cc); |
89 artifact.out(this.readDocument("src/test/ressources/" + | 84 artifact.out(this.readDocument("src/test/ressources/" + |
90 "horizontalcrosssection_mesh/" + | 85 "horizontalcrosssection_mesh/" + |
91 "horizontalcrosssection_step_07_out_csv.xml"), | 86 "horizontalcrosssection_step_07_out_wms.xml"), |
92 fos2,cc); | 87 fos2,cc); |
93 artifact.out(this.readDocument("src/test/ressources/" + | |
94 "horizontalcrosssection_mesh/" + | |
95 "horizontalcrosssection_step_07_out_odv.xml"), | |
96 fos3,cc); | |
97 } catch (Exception e) { | 88 } catch (Exception e) { |
98 log.error(e, e); | 89 log.error(e, e); |
99 fail(); | 90 fail(); |
100 } finally { | 91 } finally { |
101 try { | 92 try { |
102 fos.flush(); | 93 fos.flush(); |
103 fos.close(); | 94 fos.close(); |
104 fos2.flush(); | 95 fos2.flush(); |
105 fos2.close(); | 96 fos2.close(); |
106 fos3.flush(); | |
107 fos3.close(); | |
108 } catch (Exception e) { | 97 } catch (Exception e) { |
109 log.error(e, e); | 98 log.error(e, e); |
110 } | 99 } |
111 } | 100 } |
112 } catch (Exception e) { | 101 } catch (Exception e) { |