Mercurial > dive4elements > gnv-client
comparison gnv-artifacts/src/test/java/de/intevation/gnv/artifacts/TestCallContext.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 | e7f1c79bf9cd |
children | 9a828e5a2390 |
comparison
equal
deleted
inserted
replaced
484:823e4f808418 | 485:4939236c2dc9 |
---|---|
1 /** | 1 /** |
2 * | 2 * |
3 */ | 3 */ |
4 package de.intevation.gnv.artifacts; | 4 package de.intevation.gnv.artifacts; |
5 | 5 |
6 import de.intevation.artifacts.ArtifactDatabase; | |
7 import de.intevation.artifacts.ArtifactFactory; | |
6 import de.intevation.artifacts.CallContext; | 8 import de.intevation.artifacts.CallContext; |
7 import de.intevation.artifacts.CallMeta; | 9 import de.intevation.artifacts.CallMeta; |
8 | 10 |
9 /** | 11 /** |
10 * @author Tim Englich <tim.englich@intevation.de> | 12 * @author Tim Englich <tim.englich@intevation.de> |
11 * | 13 * |
12 */ | 14 */ |
13 public class TestCallContext implements CallContext { | 15 public class TestCallContext implements CallContext { |
14 | 16 |
17 | |
18 | |
15 private Object globalContext = null; | 19 private Object globalContext = null; |
16 private CallMeta callMeta = null; | 20 private CallMeta callMeta = null; |
17 | 21 private ArtifactFactory artifactFactory = null; |
22 private ArtifactDatabase artifactDatabase = null; | |
18 /** | 23 /** |
19 * Constructor | 24 * Constructor |
20 */ | 25 */ |
21 public TestCallContext(Object globalContext, CallMeta callMeta) { | 26 public TestCallContext(Object globalContext, |
27 CallMeta callMeta, | |
28 ArtifactFactory artifactFactory) { | |
22 this.globalContext = globalContext; | 29 this.globalContext = globalContext; |
23 this.callMeta = callMeta; | 30 this.callMeta = callMeta; |
31 this.artifactDatabase = new TestArtifactDatabase(artifactFactory); | |
24 } | 32 } |
25 | 33 |
26 /** | 34 /** |
27 * @see de.intevation.artifacts.CallContext#afterBackground(int) | 35 * @see de.intevation.artifacts.CallContext#afterBackground(int) |
28 */ | 36 */ |
45 public CallMeta getMeta() { | 53 public CallMeta getMeta() { |
46 return this.callMeta; | 54 return this.callMeta; |
47 } | 55 } |
48 | 56 |
49 public Object getContextValue(Object key) { | 57 public Object getContextValue(Object key) { |
50 | 58 return null; |
51 return null; | |
52 } | 59 } |
53 | 60 |
54 public Object putContextValue(Object key, Object value) { | 61 public Object putContextValue(Object key, Object value) { |
55 | 62 return null; |
56 return null; | |
57 } | 63 } |
58 | 64 |
65 public ArtifactDatabase getDatabase() { | |
66 return this.artifactDatabase; | |
67 } | |
59 } | 68 } |