Author: julien(a)jboss.com
Date: 2007-12-18 16:20:11 -0500 (Tue, 18 Dec 2007)
New Revision: 9363
Modified:
branches/presentation/presentation/src/main/org/jboss/portal/presentation/test/model/MockModelTestCase.java
branches/presentation/presentation/src/main/org/jboss/portal/presentation/test/model/ModelTestCase.java
Log:
remove dead code
Modified:
branches/presentation/presentation/src/main/org/jboss/portal/presentation/test/model/MockModelTestCase.java
===================================================================
---
branches/presentation/presentation/src/main/org/jboss/portal/presentation/test/model/MockModelTestCase.java 2007-12-18
18:34:40 UTC (rev 9362)
+++
branches/presentation/presentation/src/main/org/jboss/portal/presentation/test/model/MockModelTestCase.java 2007-12-18
21:20:11 UTC (rev 9363)
@@ -173,23 +173,6 @@
assertEquals(Collections.singletonMap("foo", "bar2"),
rootState2_1.getProperties());
}
- private void assertStale(StructuralObject object)
- {
- try
- {
- ssc.validate(object);
- fail();
- }
- catch (StateException ignore)
- {
- }
- }
-
- private void assertNotStale(StructuralObject object)
- {
- ssc.validate(object);
- }
-
public void testAddChild() throws MockException
{
MockObject mockRoot = model.getRoot();
@@ -420,4 +403,20 @@
}
}
+ private void assertStale(StructuralObject object)
+ {
+ try
+ {
+ ssc.validate(object);
+ fail();
+ }
+ catch (StateException ignore)
+ {
+ }
+ }
+
+ private void assertNotStale(StructuralObject object)
+ {
+ ssc.validate(object);
+ }
}
Modified:
branches/presentation/presentation/src/main/org/jboss/portal/presentation/test/model/ModelTestCase.java
===================================================================
---
branches/presentation/presentation/src/main/org/jboss/portal/presentation/test/model/ModelTestCase.java 2007-12-18
18:34:40 UTC (rev 9362)
+++
branches/presentation/presentation/src/main/org/jboss/portal/presentation/test/model/ModelTestCase.java 2007-12-18
21:20:11 UTC (rev 9363)
@@ -83,71 +83,6 @@
this.model = null;
}
- /**
- *
- * @throws Exception
- */
- /*public void testCreateChild() throws Exception
- {
- //Adding a UIContext...this should result in an IllegalArgumentException
- try
- {
- this.uiContext.createChild("duplicateRoot", UIContext.class);
- }
- catch(Exception e)
- {
- this.assertEquals(e.getClass(), IllegalArgumentException.class);
- }
-
- //Assert the state of UIPortal added to the UIObject tree
- UIPortal portal = this.uiContext.createChild("defaultPortal",
UIPortal.class);
- assertEquals(portal.getName(), "defaultPortal");
- assertEquals(portal.getId(), "/defaultPortal");
- assertTrue(portal.getParent() instanceof UIContext);
-
- //Add a UIPage to the UIPortal
- UIPage page = portal.createChild("defaultPage", UIPage.class);
- assertEquals(page.getName(), "defaultPage");
- assertEquals(page.getId(), "/defaultPortal/defaultPage");
- assertTrue(page.getParent() instanceof UIPortal);
-
- //Add a UIPage to the UIContainer
- UIContainer container = page.createChild("defaultContainer",
UIContainer.class);
- assertEquals(container.getName(), "defaultContainer");
- assertEquals(container.getId(),
"/defaultPortal/defaultPage/defaultContainer");
- assertTrue(container.getParent() instanceof UIPage);
-
- //Add a UIWindow to UIPage
- UIWindow window = container.createChild("defaultWindow", UIWindow.class);
- assertEquals(window.getName(), "defaultWindow");
- assertEquals(window.getId(),
"/defaultPortal/defaultPage/defaultContainer/defaultWindow");
- assertTrue(window.getParent() instanceof UIContainer);
- }*/
-
- /**
- *
- * @throws Exception
- */
- /*public void testDestroyChild() throws Exception
- {
- //Assert the state of UIPortal added to the UIObject tree
- UIPortal portal = this.uiContext.createChild("defaultPortal",
UIPortal.class);
-
- //Add a UIPage to the UIPortal
- UIPage page = portal.createChild("defaultPage", UIPage.class);
-
- //Add a UIPage to the UIContainer
- UIContainer container = page.createChild("defaultContainer",
UIContainer.class);
-
- //Add a UIWindow to UIPage
- UIWindow window = container.createChild("defaultWindow", UIWindow.class);
-
- //Destroy the container. When this is done, both container and window must be
destroyed from the UIObject tree
- page.removeChild(container.getName());
- List<UIObject> pageChildren = page.getChildren();
- assertTrue(pageChildren == null || pageChildren.size() == 0);
- }*/
-
public void testUIContextParentIsNull()
{
UIContext context = createContext();