Mercurial > dive4elements > gnv-client
annotate gnv-artifacts/src/test/java/de/intevation/gnv/artifacts/TestArtifactDatabase.java @ 503:b951b14425fa
Solved issue 129. Renamed i and j axis to 'West-East-Axis' and 'North-South-Axis'.
gnv-artifacts/trunk@586 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Ingo Weinzierl <ingo.weinzierl@intevation.de> |
---|---|
date | Wed, 20 Jan 2010 15:48:31 +0000 |
parents | 4939236c2dc9 |
children | 9e5ed3eebf29 |
rev | line source |
---|---|
485
4939236c2dc9
Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
1 /** |
4939236c2dc9
Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
2 * |
4939236c2dc9
Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
3 */ |
4939236c2dc9
Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
4 package de.intevation.gnv.artifacts; |
4939236c2dc9
Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
5 |
4939236c2dc9
Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
6 import org.w3c.dom.Document; |
4939236c2dc9
Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
7 |
4939236c2dc9
Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
8 import de.intevation.artifacts.ArtifactDatabase; |
4939236c2dc9
Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
9 import de.intevation.artifacts.ArtifactDatabaseException; |
4939236c2dc9
Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
10 import de.intevation.artifacts.ArtifactFactory; |
4939236c2dc9
Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
11 import de.intevation.artifacts.CallMeta; |
4939236c2dc9
Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
12 |
4939236c2dc9
Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
13 /** |
4939236c2dc9
Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
14 * @author Tim Englich <tim.englich@intevation.de> |
4939236c2dc9
Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
15 * |
4939236c2dc9
Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
16 */ |
4939236c2dc9
Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
17 public class TestArtifactDatabase implements ArtifactDatabase { |
4939236c2dc9
Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
18 |
4939236c2dc9
Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
19 private ArtifactFactory artifactFactory = null; |
4939236c2dc9
Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
20 /** |
4939236c2dc9
Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
21 * Constructor |
4939236c2dc9
Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
22 */ |
4939236c2dc9
Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
23 public TestArtifactDatabase(ArtifactFactory artifactFactory) { |
4939236c2dc9
Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
24 this.artifactFactory = artifactFactory; |
4939236c2dc9
Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
25 } |
4939236c2dc9
Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
26 |
4939236c2dc9
Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
27 /** |
4939236c2dc9
Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
28 * @see de.intevation.artifacts.ArtifactDatabase#advance(java.lang.String, org.w3c.dom.Document, de.intevation.artifacts.CallMeta) |
4939236c2dc9
Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
29 */ |
4939236c2dc9
Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
30 public Document advance(String artifact, Document target, CallMeta callMeta) |
4939236c2dc9
Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
31 throws ArtifactDatabaseException { |
4939236c2dc9
Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
32 |
4939236c2dc9
Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
33 return null; |
4939236c2dc9
Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
34 } |
4939236c2dc9
Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
35 |
4939236c2dc9
Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
36 /** |
4939236c2dc9
Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
37 * @see de.intevation.artifacts.ArtifactDatabase#artifactFactoryNamesAndDescriptions() |
4939236c2dc9
Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
38 */ |
4939236c2dc9
Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
39 public String[][] artifactFactoryNamesAndDescriptions() { |
4939236c2dc9
Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
40 |
4939236c2dc9
Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
41 return null; |
4939236c2dc9
Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
42 } |
4939236c2dc9
Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
43 |
4939236c2dc9
Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
44 /** |
4939236c2dc9
Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
45 * @see de.intevation.artifacts.ArtifactDatabase#createArtifactWithFactory(java.lang.String, de.intevation.artifacts.CallMeta) |
4939236c2dc9
Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
46 */ |
4939236c2dc9
Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
47 public Document createArtifactWithFactory(String factory, CallMeta callMeta) |
4939236c2dc9
Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
48 throws ArtifactDatabaseException { |
4939236c2dc9
Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
49 |
4939236c2dc9
Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
50 return null; |
4939236c2dc9
Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
51 } |
4939236c2dc9
Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
52 |
4939236c2dc9
Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
53 /** |
4939236c2dc9
Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
54 * @see de.intevation.artifacts.ArtifactDatabase#describe(java.lang.String, org.w3c.dom.Document, de.intevation.artifacts.CallMeta) |
4939236c2dc9
Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
55 */ |
4939236c2dc9
Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
56 public Document describe(String artifact, Document data, CallMeta callMeta) |
4939236c2dc9
Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
57 throws ArtifactDatabaseException { |
4939236c2dc9
Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
58 |
4939236c2dc9
Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
59 return null; |
4939236c2dc9
Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
60 } |
4939236c2dc9
Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
61 |
4939236c2dc9
Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
62 /** |
4939236c2dc9
Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
63 * @see de.intevation.artifacts.ArtifactDatabase#feed(java.lang.String, org.w3c.dom.Document, de.intevation.artifacts.CallMeta) |
4939236c2dc9
Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
64 */ |
4939236c2dc9
Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
65 public Document feed(String artifact, Document data, CallMeta callMeta) |
4939236c2dc9
Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
66 throws ArtifactDatabaseException { |
4939236c2dc9
Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
67 |
4939236c2dc9
Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
68 return null; |
4939236c2dc9
Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
69 } |
4939236c2dc9
Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
70 |
4939236c2dc9
Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
71 /** |
4939236c2dc9
Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
72 * @see de.intevation.artifacts.ArtifactDatabase#getInternalArtifactFactory(java.lang.String) |
4939236c2dc9
Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
73 */ |
4939236c2dc9
Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
74 public ArtifactFactory getInternalArtifactFactory(String factoryName) { |
4939236c2dc9
Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
75 return this.artifactFactory; |
4939236c2dc9
Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
76 } |
4939236c2dc9
Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
77 |
4939236c2dc9
Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
78 /** |
4939236c2dc9
Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
79 * @see de.intevation.artifacts.ArtifactDatabase#out(java.lang.String, org.w3c.dom.Document, de.intevation.artifacts.CallMeta) |
4939236c2dc9
Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
80 */ |
4939236c2dc9
Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
81 public DeferredOutput out(String artifact, Document format, |
4939236c2dc9
Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
82 CallMeta callMeta) |
4939236c2dc9
Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
83 throws ArtifactDatabaseException { |
4939236c2dc9
Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
84 |
4939236c2dc9
Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
85 return null; |
4939236c2dc9
Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
86 } |
4939236c2dc9
Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
87 |
4939236c2dc9
Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
88 } |