annotate gnv-artifacts/src/test/java/de/intevation/gnv/artifacts/TestCallContext.java @ 612:e86d37008fd1

Added new Transition and State for using the PreSettingsValue for the decision if a Transition could be used and the usage of PreSettings as InputValues. gnv-artifacts/trunk@678 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Tim Englich <tim.englich@intevation.de>
date Fri, 12 Feb 2010 09:11:49 +0000
parents 4939236c2dc9
children 9a828e5a2390
rev   line source
102
994a39b084d6 Imporved JUnitTest and Bugfixing as a Result of this Improvement.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
1 /**
994a39b084d6 Imporved JUnitTest and Bugfixing as a Result of this Improvement.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
2 *
994a39b084d6 Imporved JUnitTest and Bugfixing as a Result of this Improvement.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
3 */
994a39b084d6 Imporved JUnitTest and Bugfixing as a Result of this Improvement.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
4 package de.intevation.gnv.artifacts;
994a39b084d6 Imporved JUnitTest and Bugfixing as a Result of this Improvement.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
5
485
4939236c2dc9 Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents: 306
diff changeset
6 import de.intevation.artifacts.ArtifactDatabase;
4939236c2dc9 Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents: 306
diff changeset
7 import de.intevation.artifacts.ArtifactFactory;
102
994a39b084d6 Imporved JUnitTest and Bugfixing as a Result of this Improvement.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
8 import de.intevation.artifacts.CallContext;
116
820238357bab Added Horizontal-Profile-Support for Meshes.
Tim Englich <tim.englich@intevation.de>
parents: 102
diff changeset
9 import de.intevation.artifacts.CallMeta;
102
994a39b084d6 Imporved JUnitTest and Bugfixing as a Result of this Improvement.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
10
994a39b084d6 Imporved JUnitTest and Bugfixing as a Result of this Improvement.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
11 /**
994a39b084d6 Imporved JUnitTest and Bugfixing as a Result of this Improvement.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
12 * @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: 117
diff changeset
13 *
102
994a39b084d6 Imporved JUnitTest and Bugfixing as a Result of this Improvement.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
14 */
994a39b084d6 Imporved JUnitTest and Bugfixing as a Result of this Improvement.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
15 public class TestCallContext implements CallContext {
994a39b084d6 Imporved JUnitTest and Bugfixing as a Result of this Improvement.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
16
485
4939236c2dc9 Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents: 306
diff changeset
17
4939236c2dc9 Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents: 306
diff changeset
18
102
994a39b084d6 Imporved JUnitTest and Bugfixing as a Result of this Improvement.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
19 private Object globalContext = null;
117
ef157bd2fa92 LanguageSupport integrated
Tim Englich <tim.englich@intevation.de>
parents: 116
diff changeset
20 private CallMeta callMeta = null;
485
4939236c2dc9 Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents: 306
diff changeset
21 private ArtifactFactory artifactFactory = null;
4939236c2dc9 Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents: 306
diff changeset
22 private ArtifactDatabase artifactDatabase = null;
102
994a39b084d6 Imporved JUnitTest and Bugfixing as a Result of this Improvement.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
23 /**
994a39b084d6 Imporved JUnitTest and Bugfixing as a Result of this Improvement.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
24 * Constructor
994a39b084d6 Imporved JUnitTest and Bugfixing as a Result of this Improvement.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
25 */
485
4939236c2dc9 Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents: 306
diff changeset
26 public TestCallContext(Object globalContext,
4939236c2dc9 Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents: 306
diff changeset
27 CallMeta callMeta,
4939236c2dc9 Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents: 306
diff changeset
28 ArtifactFactory artifactFactory) {
102
994a39b084d6 Imporved JUnitTest and Bugfixing as a Result of this Improvement.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
29 this.globalContext = globalContext;
117
ef157bd2fa92 LanguageSupport integrated
Tim Englich <tim.englich@intevation.de>
parents: 116
diff changeset
30 this.callMeta = callMeta;
485
4939236c2dc9 Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents: 306
diff changeset
31 this.artifactDatabase = new TestArtifactDatabase(artifactFactory);
102
994a39b084d6 Imporved JUnitTest and Bugfixing as a Result of this Improvement.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
32 }
994a39b084d6 Imporved JUnitTest and Bugfixing as a Result of this Improvement.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
33
994a39b084d6 Imporved JUnitTest and Bugfixing as a Result of this Improvement.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
34 /**
994a39b084d6 Imporved JUnitTest and Bugfixing as a Result of this Improvement.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
35 * @see de.intevation.artifacts.CallContext#afterBackground(int)
994a39b084d6 Imporved JUnitTest and Bugfixing as a Result of this Improvement.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
36 */
994a39b084d6 Imporved JUnitTest and Bugfixing as a Result of this Improvement.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
37 public void afterBackground(int action) {
994a39b084d6 Imporved JUnitTest and Bugfixing as a Result of this Improvement.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
38 }
994a39b084d6 Imporved JUnitTest and Bugfixing as a Result of this Improvement.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
39
994a39b084d6 Imporved JUnitTest and Bugfixing as a Result of this Improvement.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
40 /**
994a39b084d6 Imporved JUnitTest and Bugfixing as a Result of this Improvement.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
41 * @see de.intevation.artifacts.CallContext#afterCall(int)
994a39b084d6 Imporved JUnitTest and Bugfixing as a Result of this Improvement.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
42 */
994a39b084d6 Imporved JUnitTest and Bugfixing as a Result of this Improvement.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
43 public void afterCall(int action) {
994a39b084d6 Imporved JUnitTest and Bugfixing as a Result of this Improvement.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
44 }
994a39b084d6 Imporved JUnitTest and Bugfixing as a Result of this Improvement.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
45
994a39b084d6 Imporved JUnitTest and Bugfixing as a Result of this Improvement.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
46 /**
994a39b084d6 Imporved JUnitTest and Bugfixing as a Result of this Improvement.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
47 * @see de.intevation.artifacts.CallContext#globalContext()
994a39b084d6 Imporved JUnitTest and Bugfixing as a Result of this Improvement.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
48 */
994a39b084d6 Imporved JUnitTest and Bugfixing as a Result of this Improvement.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
49 public Object globalContext() {
994a39b084d6 Imporved JUnitTest and Bugfixing as a Result of this Improvement.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
50 return this.globalContext;
994a39b084d6 Imporved JUnitTest and Bugfixing as a Result of this Improvement.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
51 }
994a39b084d6 Imporved JUnitTest and Bugfixing as a Result of this Improvement.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
52
116
820238357bab Added Horizontal-Profile-Support for Meshes.
Tim Englich <tim.englich@intevation.de>
parents: 102
diff changeset
53 public CallMeta getMeta() {
117
ef157bd2fa92 LanguageSupport integrated
Tim Englich <tim.englich@intevation.de>
parents: 116
diff changeset
54 return this.callMeta;
116
820238357bab Added Horizontal-Profile-Support for Meshes.
Tim Englich <tim.englich@intevation.de>
parents: 102
diff changeset
55 }
820238357bab Added Horizontal-Profile-Support for Meshes.
Tim Englich <tim.englich@intevation.de>
parents: 102
diff changeset
56
306
e7f1c79bf9cd Bugfix for issue91, wrong depth will be drawn in TimeseriesCharts in Meshes
Tim Englich <tim.englich@intevation.de>
parents: 171
diff changeset
57 public Object getContextValue(Object key) {
485
4939236c2dc9 Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents: 306
diff changeset
58 return null;
306
e7f1c79bf9cd Bugfix for issue91, wrong depth will be drawn in TimeseriesCharts in Meshes
Tim Englich <tim.englich@intevation.de>
parents: 171
diff changeset
59 }
e7f1c79bf9cd Bugfix for issue91, wrong depth will be drawn in TimeseriesCharts in Meshes
Tim Englich <tim.englich@intevation.de>
parents: 171
diff changeset
60
e7f1c79bf9cd Bugfix for issue91, wrong depth will be drawn in TimeseriesCharts in Meshes
Tim Englich <tim.englich@intevation.de>
parents: 171
diff changeset
61 public Object putContextValue(Object key, Object value) {
485
4939236c2dc9 Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents: 306
diff changeset
62 return null;
306
e7f1c79bf9cd Bugfix for issue91, wrong depth will be drawn in TimeseriesCharts in Meshes
Tim Englich <tim.englich@intevation.de>
parents: 171
diff changeset
63 }
e7f1c79bf9cd Bugfix for issue91, wrong depth will be drawn in TimeseriesCharts in Meshes
Tim Englich <tim.englich@intevation.de>
parents: 171
diff changeset
64
485
4939236c2dc9 Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents: 306
diff changeset
65 public ArtifactDatabase getDatabase() {
4939236c2dc9 Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents: 306
diff changeset
66 return this.artifactDatabase;
4939236c2dc9 Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents: 306
diff changeset
67 }
102
994a39b084d6 Imporved JUnitTest and Bugfixing as a Result of this Improvement.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
68 }

http://dive4elements.wald.intevation.org