taylor 2004/03/30 22:18:27
Modified: portal/src/test/org/apache/jetspeed/containers
test-navstate-container.groovy
portal/src/test/org/apache/jetspeed/container/session
TestNavigationalState.java
Log:
made navigational state render parameter names configurable
started second implmentation (session) of nav state
PR:
Obtained from:
Submitted by:
Reviewed by:
CVS: ----------------------------------------------------------------------
CVS: PR:
CVS: If this change addresses a PR in the problem report tracking
CVS: database, then enter the PR number(s) here.
CVS: Obtained from:
CVS: If this change has been taken from another system, such as NCSA,
CVS: then name the system in this line, otherwise delete it.
CVS: Submitted by:
CVS: If this code has been contributed to Apache by someone else; i.e.,
CVS: they sent us a patch or a new module, then include their name/email
CVS: address here. If this is your work then delete this line.
CVS: Reviewed by:
CVS: If we are doing pre-commit code reviews and someone else has
CVS: reviewed your changes, include their name(s) here.
CVS: If you have not had it reviewed then delete this line.
Revision Changes Path
1.3 +7 -2
jakarta-jetspeed-2/portal/src/test/org/apache/jetspeed/containers/test-navstate-container.groovy
Index: test-navstate-container.groovy
===================================================================
RCS file:
/home/cvs/jakarta-jetspeed-2/portal/src/test/org/apache/jetspeed/containers/test-navstate-container.groovy,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- test-navstate-container.groovy 30 Mar 2004 22:02:34 -0000 1.2
+++ test-navstate-container.groovy 31 Mar 2004 06:18:27 -0000 1.3
@@ -37,9 +37,14 @@
//
// Navigational State component
//
-navStateClass = "org.apache.jetspeed.container.session.impl.PathNavigationalState"
+// navigationKeys: prefix, action, mode, state, renderparam, pid, prev_mode,
prev_state, key_delim
+// navigationKeys = "_,ac,md,st,rp,pid,pm,ps,:"
+navigationKeys = "_,a,m,s,r,i,pm,ps,:"
+
+// navStateClass =
"org.apache.jetspeed.container.session.impl.PathNavigationalState"
+navStateClass =
"org.apache.jetspeed.container.session.impl.SessionNavigationalState"
container.registerComponentImplementation(NavigationalStateComponent,
JetspeedNavigationalStateComponent,
- new Parameter[] {new ConstantParameter(navStateClass)} )
+ new Parameter[] {new ConstantParameter(navStateClass), new
ConstantParameter(navigationKeys)} )
//
// Request Context component
1.4 +9 -7
jakarta-jetspeed-2/portal/src/test/org/apache/jetspeed/container/session/TestNavigationalState.java
Index: TestNavigationalState.java
===================================================================
RCS file:
/home/cvs/jakarta-jetspeed-2/portal/src/test/org/apache/jetspeed/container/session/TestNavigationalState.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- TestNavigationalState.java 30 Mar 2004 22:02:34 -0000 1.3
+++ TestNavigationalState.java 31 Mar 2004 06:18:27 -0000 1.4
@@ -33,6 +33,7 @@
import com.mockrunner.mock.web.MockHttpServletRequest;
import com.mockrunner.mock.web.MockHttpServletResponse;
+import com.mockrunner.mock.web.MockHttpSession;
import com.mockrunner.mock.web.MockServletConfig;
/**
@@ -91,21 +92,22 @@
}
public void testBasic()
- {
+ {
+ System.out.println("Starting nav state test");
assertNotNull("nav state component is null", navState);
assertNotNull("request context component is null", rcc);
MockHttpServletRequest request = new MockHttpServletRequest();
- HttpServletResponse response = new MockHttpServletResponse();
+ MockHttpSession session = new MockHttpSession();
+ HttpServletResponse response = new MockHttpServletResponse();
ServletConfig config = new MockServletConfig();
+ request.setSession(session);
request.setPathInfo("/stuff/");
RequestContext context = rcc.create(
(HttpServletRequest)request,
response,
config);
-
-System.out.println("$$$ context = " + context);
-
+
PortletWindow window = new PortletWindowImpl("33");
PortletWindow window2 = new PortletWindowImpl("222");
@@ -117,7 +119,7 @@
assertTrue("window mode is not set",
nav.getMode(window).equals(PortletMode.HELP));
assertTrue("window state is not set",
nav.getState(window).equals(WindowState.MAXIMIZED));
assertTrue("window mode is not set",
nav.getMode(window2).equals(PortletMode.VIEW));
-
+ System.out.println("Ending nav state test");
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]