Author: ndkhoiits
Date: 2010-09-07 03:08:42 -0400 (Tue, 07 Sep 2010)
New Revision: 4060
Modified:
portal/branches/branch-r4047/component/portal/src/test/java/org/exoplatform/portal/config/TestPortalConfig.java
Log:
GTNPORTAL-1359 Update testcase for removing group navigations when remove group
Modified:
portal/branches/branch-r4047/component/portal/src/test/java/org/exoplatform/portal/config/TestPortalConfig.java
===================================================================
---
portal/branches/branch-r4047/component/portal/src/test/java/org/exoplatform/portal/config/TestPortalConfig.java 2010-09-07
03:27:39 UTC (rev 4059)
+++
portal/branches/branch-r4047/component/portal/src/test/java/org/exoplatform/portal/config/TestPortalConfig.java 2010-09-07
07:08:42 UTC (rev 4060)
@@ -127,6 +127,31 @@
group = groupHandler.findGroupById("/groupTest");
assertNull(group);
}
+
+ public void testGroupNavigation() throws Exception
+ {
+ GroupHandler groupHandler = org.getGroupHandler();
+ Group group = groupHandler.createGroupInstance();
+ group.setGroupName("testGroupNavigation");
+ group.setLabel("testGroupNavigation");
+
+ groupHandler.addChild(null, group, true);
+
+ PageNavigation pageNavigation = new PageNavigation();
+ pageNavigation.setOwnerId(group.getId());
+ pageNavigation.setOwnerType(PortalConfig.GROUP_TYPE);
+ storage.create(pageNavigation);
+
+ pageNavigation = storage.getPageNavigation(PortalConfig.GROUP_TYPE,
group.getId());
+ assertNotNull(pageNavigation);
+
+ // Remove group
+ groupHandler.removeGroup(group, true);
+
+ // Group navigations is removed after remove group
+ pageNavigation = storage.getPageNavigation(PortalConfig.GROUP_TYPE,
group.getId());
+ assertNull(pageNavigation);
+ }
public void testUserLayout() throws Exception
{