01: package simpleorm.simplewebapp.context;
02:
03: import simpleorm.simplewebapp.core.WPage;
04:
05: import java.util.Map;
06:
07: /**
08: * Dummy page context when in a test case.
09: */
10: public class WPageContextTest extends WPageContext {
11:
12: Map<String, String> parameters;
13:
14: public WPageContextTest(WPage page, Map<String, String> parameters) {
15: super (page);
16: this .parameters = parameters;
17: }
18:
19: public String getParameter(String key) {
20: return parameters == null ? null : parameters.get(key);
21: }
22:
23: }
|