Mercurial > dive4elements > gnv-client
annotate gnv-artifacts/src/test/java/de/intevation/gnv/artifacts/TestCallContext.java @ 1118:c01c220312d0
Made it compile again with an updated ArtifactDatabase.
gnv-artifacts/trunk@4137 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Ingo Weinzierl <ingo.weinzierl@intevation.de> |
---|---|
date | Mon, 12 Mar 2012 08:31:46 +0000 |
parents | f953c9a559d8 |
children |
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 |
1118
c01c220312d0
Made it compile again with an updated ArtifactDatabase.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1115
diff
changeset
|
11 import java.util.List; |
c01c220312d0
Made it compile again with an updated ArtifactDatabase.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1115
diff
changeset
|
12 import java.util.LinkedList; |
c01c220312d0
Made it compile again with an updated ArtifactDatabase.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1115
diff
changeset
|
13 |
485
4939236c2dc9
Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
306
diff
changeset
|
14 import de.intevation.artifacts.ArtifactDatabase; |
4939236c2dc9
Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
306
diff
changeset
|
15 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
|
16 import de.intevation.artifacts.CallContext; |
116
820238357bab
Added Horizontal-Profile-Support for Meshes.
Tim Englich <tim.englich@intevation.de>
parents:
102
diff
changeset
|
17 import de.intevation.artifacts.CallMeta; |
1118
c01c220312d0
Made it compile again with an updated ArtifactDatabase.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1115
diff
changeset
|
18 import de.intevation.artifacts.DataProvider; |
c01c220312d0
Made it compile again with an updated ArtifactDatabase.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1115
diff
changeset
|
19 import de.intevation.artifacts.Message; |
102
994a39b084d6
Imporved JUnitTest and Bugfixing as a Result of this Improvement.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
20 |
994a39b084d6
Imporved JUnitTest and Bugfixing as a Result of this Improvement.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
21 /** |
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
|
22 * @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
|
23 * |
102
994a39b084d6
Imporved JUnitTest and Bugfixing as a Result of this Improvement.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
24 */ |
994a39b084d6
Imporved JUnitTest and Bugfixing as a Result of this Improvement.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
25 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
|
26 |
485
4939236c2dc9
Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
306
diff
changeset
|
27 |
4939236c2dc9
Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
306
diff
changeset
|
28 |
102
994a39b084d6
Imporved JUnitTest and Bugfixing as a Result of this Improvement.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
29 private Object globalContext = null; |
117
ef157bd2fa92
LanguageSupport integrated
Tim Englich <tim.englich@intevation.de>
parents:
116
diff
changeset
|
30 private CallMeta callMeta = null; |
485
4939236c2dc9
Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
306
diff
changeset
|
31 private ArtifactFactory artifactFactory = null; |
4939236c2dc9
Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
306
diff
changeset
|
32 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
|
33 /** |
994a39b084d6
Imporved JUnitTest and Bugfixing as a Result of this Improvement.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
34 * Constructor |
994a39b084d6
Imporved JUnitTest and Bugfixing as a Result of this Improvement.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
35 */ |
778
9a828e5a2390
Removed trailing whitespace
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
485
diff
changeset
|
36 public TestCallContext(Object globalContext, |
9a828e5a2390
Removed trailing whitespace
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
485
diff
changeset
|
37 CallMeta callMeta, |
485
4939236c2dc9
Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
306
diff
changeset
|
38 ArtifactFactory artifactFactory) { |
102
994a39b084d6
Imporved JUnitTest and Bugfixing as a Result of this Improvement.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
39 this.globalContext = globalContext; |
117
ef157bd2fa92
LanguageSupport integrated
Tim Englich <tim.englich@intevation.de>
parents:
116
diff
changeset
|
40 this.callMeta = callMeta; |
485
4939236c2dc9
Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
306
diff
changeset
|
41 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
|
42 } |
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 * @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
|
46 */ |
994a39b084d6
Imporved JUnitTest and Bugfixing as a Result of this Improvement.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
47 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
|
48 } |
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 * @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
|
52 */ |
994a39b084d6
Imporved JUnitTest and Bugfixing as a Result of this Improvement.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
53 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
|
54 } |
994a39b084d6
Imporved JUnitTest and Bugfixing as a Result of this Improvement.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
55 |
1118
c01c220312d0
Made it compile again with an updated ArtifactDatabase.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1115
diff
changeset
|
56 public boolean isInBackground() { |
c01c220312d0
Made it compile again with an updated ArtifactDatabase.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1115
diff
changeset
|
57 throw new UnsupportedOperationException("Not supported yet."); |
c01c220312d0
Made it compile again with an updated ArtifactDatabase.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1115
diff
changeset
|
58 } |
c01c220312d0
Made it compile again with an updated ArtifactDatabase.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1115
diff
changeset
|
59 |
c01c220312d0
Made it compile again with an updated ArtifactDatabase.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1115
diff
changeset
|
60 public void addBackgroundMessage(Message msg) { |
c01c220312d0
Made it compile again with an updated ArtifactDatabase.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1115
diff
changeset
|
61 throw new UnsupportedOperationException("Not supported yet."); |
c01c220312d0
Made it compile again with an updated ArtifactDatabase.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1115
diff
changeset
|
62 } |
c01c220312d0
Made it compile again with an updated ArtifactDatabase.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1115
diff
changeset
|
63 |
102
994a39b084d6
Imporved JUnitTest and Bugfixing as a Result of this Improvement.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
64 /** |
994a39b084d6
Imporved JUnitTest and Bugfixing as a Result of this Improvement.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
65 * @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
|
66 */ |
994a39b084d6
Imporved JUnitTest and Bugfixing as a Result of this Improvement.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
67 public Object globalContext() { |
994a39b084d6
Imporved JUnitTest and Bugfixing as a Result of this Improvement.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
68 return this.globalContext; |
994a39b084d6
Imporved JUnitTest and Bugfixing as a Result of this Improvement.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
69 } |
994a39b084d6
Imporved JUnitTest and Bugfixing as a Result of this Improvement.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
70 |
116
820238357bab
Added Horizontal-Profile-Support for Meshes.
Tim Englich <tim.englich@intevation.de>
parents:
102
diff
changeset
|
71 public CallMeta getMeta() { |
117
ef157bd2fa92
LanguageSupport integrated
Tim Englich <tim.englich@intevation.de>
parents:
116
diff
changeset
|
72 return this.callMeta; |
116
820238357bab
Added Horizontal-Profile-Support for Meshes.
Tim Englich <tim.englich@intevation.de>
parents:
102
diff
changeset
|
73 } |
820238357bab
Added Horizontal-Profile-Support for Meshes.
Tim Englich <tim.englich@intevation.de>
parents:
102
diff
changeset
|
74 |
306
e7f1c79bf9cd
Bugfix for issue91, wrong depth will be drawn in TimeseriesCharts in Meshes
Tim Englich <tim.englich@intevation.de>
parents:
171
diff
changeset
|
75 public Object getContextValue(Object key) { |
485
4939236c2dc9
Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
306
diff
changeset
|
76 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
|
77 } |
e7f1c79bf9cd
Bugfix for issue91, wrong depth will be drawn in TimeseriesCharts in Meshes
Tim Englich <tim.englich@intevation.de>
parents:
171
diff
changeset
|
78 |
e7f1c79bf9cd
Bugfix for issue91, wrong depth will be drawn in TimeseriesCharts in Meshes
Tim Englich <tim.englich@intevation.de>
parents:
171
diff
changeset
|
79 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
|
80 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
|
81 } |
e7f1c79bf9cd
Bugfix for issue91, wrong depth will be drawn in TimeseriesCharts in Meshes
Tim Englich <tim.englich@intevation.de>
parents:
171
diff
changeset
|
82 |
485
4939236c2dc9
Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
306
diff
changeset
|
83 public ArtifactDatabase getDatabase() { |
4939236c2dc9
Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
306
diff
changeset
|
84 return this.artifactDatabase; |
4939236c2dc9
Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
306
diff
changeset
|
85 } |
797
9d2891068ba5
Fixed test mockups to let them implement their interface correctly.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
780
diff
changeset
|
86 |
9d2891068ba5
Fixed test mockups to let them implement their interface correctly.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
780
diff
changeset
|
87 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
|
88 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
|
89 } |
1118
c01c220312d0
Made it compile again with an updated ArtifactDatabase.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1115
diff
changeset
|
90 |
c01c220312d0
Made it compile again with an updated ArtifactDatabase.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1115
diff
changeset
|
91 public Object registerDataProvider(Object key, DataProvider provider) { |
c01c220312d0
Made it compile again with an updated ArtifactDatabase.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1115
diff
changeset
|
92 throw new UnsupportedOperationException("Not supported yet."); |
c01c220312d0
Made it compile again with an updated ArtifactDatabase.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1115
diff
changeset
|
93 } |
c01c220312d0
Made it compile again with an updated ArtifactDatabase.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1115
diff
changeset
|
94 |
c01c220312d0
Made it compile again with an updated ArtifactDatabase.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1115
diff
changeset
|
95 public List<DataProvider> getDataProvider(Object key) { |
c01c220312d0
Made it compile again with an updated ArtifactDatabase.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1115
diff
changeset
|
96 throw new UnsupportedOperationException("Not supported yet."); |
c01c220312d0
Made it compile again with an updated ArtifactDatabase.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1115
diff
changeset
|
97 } |
c01c220312d0
Made it compile again with an updated ArtifactDatabase.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1115
diff
changeset
|
98 |
c01c220312d0
Made it compile again with an updated ArtifactDatabase.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1115
diff
changeset
|
99 public LinkedList<Message> getBackgroundMessages() { |
c01c220312d0
Made it compile again with an updated ArtifactDatabase.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1115
diff
changeset
|
100 throw new UnsupportedOperationException("Not supported yet."); |
c01c220312d0
Made it compile again with an updated ArtifactDatabase.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1115
diff
changeset
|
101 } |
102
994a39b084d6
Imporved JUnitTest and Bugfixing as a Result of this Improvement.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
102 } |