Author: julien_viet
Date: 2010-09-02 05:33:23 -0400 (Thu, 02 Sep 2010)
New Revision: 4026
Modified:
portal/branches/navcontroller/component/web/controller/src/test/java/org/exoplatform/web/controller/router/TestPortalConfiguration.java
Log:
update unit test
Modified:
portal/branches/navcontroller/component/web/controller/src/test/java/org/exoplatform/web/controller/router/TestPortalConfiguration.java
===================================================================
---
portal/branches/navcontroller/component/web/controller/src/test/java/org/exoplatform/web/controller/router/TestPortalConfiguration.java 2010-09-02
09:27:13 UTC (rev 4025)
+++
portal/branches/navcontroller/component/web/controller/src/test/java/org/exoplatform/web/controller/router/TestPortalConfiguration.java 2010-09-02
09:33:23 UTC (rev 4026)
@@ -42,12 +42,15 @@
{
RouterMetaData routerMD = new RouterMetaData();
ControllerRefMetaData portalControllerRef = new ControllerRefMetaData();
+ portalControllerRef.addParameter(new QualifiedName("gtn",
"controller"), "site");
portalControllerRef.addParameter(new QualifiedName("gtn",
"sitetype"), "portal");
routerMD.addRoute("/private/{{gtn}sitename}{{gtn}path:.*}",
portalControllerRef);
ControllerRefMetaData groupControllerRef = new ControllerRefMetaData();
+ portalControllerRef.addParameter(new QualifiedName("gtn",
"controller"), "site");
groupControllerRef.addParameter(new QualifiedName("gtn",
"sitetype"), "group");
routerMD.addRoute("/groups/{{gtn}sitename}{{gtn}path:.*}",
groupControllerRef);
ControllerRefMetaData userControllerRef = new ControllerRefMetaData();
+ portalControllerRef.addParameter(new QualifiedName("gtn",
"controller"), "site");
userControllerRef.addParameter(new QualifiedName("gtn",
"sitetype"), "user");
routerMD.addRoute("/users/{{gtn}sitename}{{gtn}path:.*}",
userControllerRef);
@@ -58,6 +61,7 @@
public void testPrivateClassic() throws Exception
{
Map<QualifiedName, String[]> expectedParameters = new
HashMap<QualifiedName, String[]>();
+ expectedParameters.put(new QualifiedName("gtn", "controller"),
new String[]{"site"});
expectedParameters.put(new QualifiedName("gtn", "sitename"),
new String[]{"classic"});
expectedParameters.put(new QualifiedName("gtn", "sitetype"),
new String[]{"portal"});
expectedParameters.put(new QualifiedName("gtn", "path"), new
String[]{""});
@@ -71,6 +75,7 @@
{
router.process(new ControllerContext("/private/classic/"));
Map<QualifiedName, String[]> expectedParameters = new
HashMap<QualifiedName, String[]>();
+ expectedParameters.put(new QualifiedName("gtn", "controller"),
new String[]{"site"});
expectedParameters.put(new QualifiedName("gtn", "sitename"),
new String[]{"classic"});
expectedParameters.put(new QualifiedName("gtn", "sitetype"),
new String[]{"portal"});
expectedParameters.put(new QualifiedName("gtn", "path"), new
String[]{"/"});
@@ -83,6 +88,7 @@
public void testPrivateClassicHome() throws Exception
{
Map<QualifiedName, String[]> expectedParameters = new
HashMap<QualifiedName, String[]>();
+ expectedParameters.put(new QualifiedName("gtn", "controller"),
new String[]{"site"});
expectedParameters.put(new QualifiedName("gtn", "sitename"),
new String[]{"classic"});
expectedParameters.put(new QualifiedName("gtn", "sitetype"),
new String[]{"portal"});
expectedParameters.put(new QualifiedName("gtn", "path"), new
String[]{"/home"});