Mercurial > dive4elements > gnv-client
annotate gnv-artifacts/src/test/java/de/intevation/gnv/artifacts/TestCallContext.java @ 1115:f953c9a559d8
Added license file and license headers.
gnv-artifacts/trunk@1260 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Ingo Weinzierl <ingo.weinzierl@intevation.de> |
---|---|
date | Tue, 02 Nov 2010 17:46:55 +0000 |
parents | 9d2891068ba5 |
children | c01c220312d0 |
rev | line source |
---|---|
1115
f953c9a559d8
Added license file and license headers.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
797
diff
changeset
|
1 /* |
f953c9a559d8
Added license file and license headers.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
797
diff
changeset
|
2 * Copyright (c) 2010 by Intevation GmbH |
f953c9a559d8
Added license file and license headers.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
797
diff
changeset
|
3 * |
f953c9a559d8
Added license file and license headers.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
797
diff
changeset
|
4 * This program is free software under the LGPL (>=v2.1) |
f953c9a559d8
Added license file and license headers.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
797
diff
changeset
|
5 * Read the file LGPL.txt coming with the software for details |
f953c9a559d8
Added license file and license headers.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
797
diff
changeset
|
6 * or visit http://www.gnu.org/licenses/ if it does not exist. |
f953c9a559d8
Added license file and license headers.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
797
diff
changeset
|
7 */ |
f953c9a559d8
Added license file and license headers.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
797
diff
changeset
|
8 |
102
994a39b084d6
Imporved JUnitTest and Bugfixing as a Result of this Improvement.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
9 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
|
10 |
485
4939236c2dc9
Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
306
diff
changeset
|
11 import de.intevation.artifacts.ArtifactDatabase; |
4939236c2dc9
Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
306
diff
changeset
|
12 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
|
13 import de.intevation.artifacts.CallContext; |
116
820238357bab
Added Horizontal-Profile-Support for Meshes.
Tim Englich <tim.englich@intevation.de>
parents:
102
diff
changeset
|
14 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
|
15 |
994a39b084d6
Imporved JUnitTest and Bugfixing as a Result of this Improvement.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
16 /** |
780
c4156275c1e1
Bring @author javadoc tags in form '@author <a href="john.doe@example.com">John Doe</a>'
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
779
diff
changeset
|
17 * @author <a href="mailto:tim.englich@intevation.de">Tim Englich</a> |
778
9a828e5a2390
Removed trailing whitespace
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
485
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 */ |
994a39b084d6
Imporved JUnitTest and Bugfixing as a Result of this Improvement.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
20 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
|
21 |
485
4939236c2dc9
Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
306
diff
changeset
|
22 |
4939236c2dc9
Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
306
diff
changeset
|
23 |
102
994a39b084d6
Imporved JUnitTest and Bugfixing as a Result of this Improvement.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
24 private Object globalContext = null; |
117
ef157bd2fa92
LanguageSupport integrated
Tim Englich <tim.englich@intevation.de>
parents:
116
diff
changeset
|
25 private CallMeta callMeta = null; |
485
4939236c2dc9
Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
306
diff
changeset
|
26 private ArtifactFactory artifactFactory = null; |
4939236c2dc9
Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
306
diff
changeset
|
27 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
|
28 /** |
994a39b084d6
Imporved JUnitTest and Bugfixing as a Result of this Improvement.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
29 * Constructor |
994a39b084d6
Imporved JUnitTest and Bugfixing as a Result of this Improvement.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
30 */ |
778
9a828e5a2390
Removed trailing whitespace
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
485
diff
changeset
|
31 public TestCallContext(Object globalContext, |
9a828e5a2390
Removed trailing whitespace
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
485
diff
changeset
|
32 CallMeta callMeta, |
485
4939236c2dc9
Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
306
diff
changeset
|
33 ArtifactFactory artifactFactory) { |
102
994a39b084d6
Imporved JUnitTest and Bugfixing as a Result of this Improvement.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
34 this.globalContext = globalContext; |
117
ef157bd2fa92
LanguageSupport integrated
Tim Englich <tim.englich@intevation.de>
parents:
116
diff
changeset
|
35 this.callMeta = callMeta; |
485
4939236c2dc9
Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
306
diff
changeset
|
36 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
|
37 } |
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 * @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
|
41 */ |
994a39b084d6
Imporved JUnitTest and Bugfixing as a Result of this Improvement.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
42 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
|
43 } |
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 * @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
|
47 */ |
994a39b084d6
Imporved JUnitTest and Bugfixing as a Result of this Improvement.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
48 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
|
49 } |
994a39b084d6
Imporved JUnitTest and Bugfixing as a Result of this Improvement.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
50 |
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 * @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
|
53 */ |
994a39b084d6
Imporved JUnitTest and Bugfixing as a Result of this Improvement.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
54 public Object globalContext() { |
994a39b084d6
Imporved JUnitTest and Bugfixing as a Result of this Improvement.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
55 return this.globalContext; |
994a39b084d6
Imporved JUnitTest and Bugfixing as a Result of this Improvement.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
56 } |
994a39b084d6
Imporved JUnitTest and Bugfixing as a Result of this Improvement.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
57 |
116
820238357bab
Added Horizontal-Profile-Support for Meshes.
Tim Englich <tim.englich@intevation.de>
parents:
102
diff
changeset
|
58 public CallMeta getMeta() { |
117
ef157bd2fa92
LanguageSupport integrated
Tim Englich <tim.englich@intevation.de>
parents:
116
diff
changeset
|
59 return this.callMeta; |
116
820238357bab
Added Horizontal-Profile-Support for Meshes.
Tim Englich <tim.englich@intevation.de>
parents:
102
diff
changeset
|
60 } |
820238357bab
Added Horizontal-Profile-Support for Meshes.
Tim Englich <tim.englich@intevation.de>
parents:
102
diff
changeset
|
61 |
306
e7f1c79bf9cd
Bugfix for issue91, wrong depth will be drawn in TimeseriesCharts in Meshes
Tim Englich <tim.englich@intevation.de>
parents:
171
diff
changeset
|
62 public Object getContextValue(Object key) { |
485
4939236c2dc9
Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
306
diff
changeset
|
63 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
|
64 } |
e7f1c79bf9cd
Bugfix for issue91, wrong depth will be drawn in TimeseriesCharts in Meshes
Tim Englich <tim.englich@intevation.de>
parents:
171
diff
changeset
|
65 |
e7f1c79bf9cd
Bugfix for issue91, wrong depth will be drawn in TimeseriesCharts in Meshes
Tim Englich <tim.englich@intevation.de>
parents:
171
diff
changeset
|
66 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
|
67 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
|
68 } |
e7f1c79bf9cd
Bugfix for issue91, wrong depth will be drawn in TimeseriesCharts in Meshes
Tim Englich <tim.englich@intevation.de>
parents:
171
diff
changeset
|
69 |
485
4939236c2dc9
Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
306
diff
changeset
|
70 public ArtifactDatabase getDatabase() { |
4939236c2dc9
Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
306
diff
changeset
|
71 return this.artifactDatabase; |
4939236c2dc9
Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
306
diff
changeset
|
72 } |
797
9d2891068ba5
Fixed test mockups to let them implement their interface correctly.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
780
diff
changeset
|
73 |
9d2891068ba5
Fixed test mockups to let them implement their interface correctly.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
780
diff
changeset
|
74 public Long getTimeToLive() { |
9d2891068ba5
Fixed test mockups to let them implement their interface correctly.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
780
diff
changeset
|
75 throw new UnsupportedOperationException("Not supported yet."); |
9d2891068ba5
Fixed test mockups to let them implement their interface correctly.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
780
diff
changeset
|
76 } |
102
994a39b084d6
Imporved JUnitTest and Bugfixing as a Result of this Improvement.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
77 } |