Author: julien(a)jboss.com
Date: 2007-12-28 17:01:35 -0500 (Fri, 28 Dec 2007)
New Revision: 9401
Modified:
branches/presentation/presentation/src/main/org/jboss/portal/presentation/test/model/ModelTestCase.java
Log:
- test a bit more the refresh operation and improve its implementation
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-28
21:57:29 UTC (rev 9400)
+++
branches/presentation/presentation/src/main/org/jboss/portal/presentation/test/model/ModelTestCase.java 2007-12-28
22:01:35 UTC (rev 9401)
@@ -791,30 +791,6 @@
context1.getChild("bar").refresh();
}
- public void testRefreshAfterConcurrentMove2() throws Exception
- {
- MockObject mockRoot = model.getRoot();
-
- MockObject mockFoo = mockRoot.addChild("foo", MockObject.Type.PORTAL);
- MockObject mockBar = mockRoot.addChild("bar", MockObject.Type.PORTAL);
-
- MockObject mockFooJuu = mockFoo.addChild("juu", MockObject.Type.PAGE);
- MockObject mockFooDaa = mockFoo.addChild("daa", MockObject.Type.PAGE);
-
- MockObject mockBarDaa = mockBar.addChild("daa", MockObject.Type.PAGE);
-
- // Load fully the context 1
- UIContext context1 = createContext();
- loadSubTree(context1);
-
- // Concurrent move
- UIContext context2 = createContext();
-
context2.getChild("foo").getChild("juu").move(context2.getChild("bar"));
-
- //
- context1.getChild("foo").refresh();
- }
-
public void testPartialRefreshAfterConcurrentMove() throws Exception
{
MockObject mockRoot = model.getRoot();
@@ -858,6 +834,7 @@
assertEquals(UIObject.Status.STALE, foo2.getStatus());
assertEquals(UIObject.Status.VALID, bar2.getStatus());
assertEquals(Tools.toSet(juu2), new HashSet<UIObject>(bar2.getChildren()));
+ assertEquals(bar2, juu2.getParent());
//
context3.refresh(CRAWLER);
Show replies by date