Author: chris.laprun(a)jboss.com
Date: 2008-08-26 12:08:32 -0400 (Tue, 26 Aug 2008)
New Revision: 11739
Modified:
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/test/core/model/portal/coordination/CoordinationServiceTestCase.java
Log:
- Minor.
Modified:
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/test/core/model/portal/coordination/CoordinationServiceTestCase.java
===================================================================
---
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/test/core/model/portal/coordination/CoordinationServiceTestCase.java 2008-08-26
16:07:31 UTC (rev 11738)
+++
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/test/core/model/portal/coordination/CoordinationServiceTestCase.java 2008-08-26
16:08:32 UTC (rev 11739)
@@ -22,30 +22,31 @@
package org.jboss.portal.test.core.model.portal.coordination;
-import static java.lang.Boolean.*;
-import org.jboss.portal.test.core.model.portal.AbstractPortalObjectContainerTestCase;
+import junit.framework.TestSuite;
+import org.apache.log4j.Appender;
+import org.apache.log4j.ConsoleAppender;
+import org.apache.log4j.Level;
+import org.apache.log4j.Logger;
+import org.apache.log4j.SimpleLayout;
import org.jboss.portal.common.junit.TransactionAssert;
+import org.jboss.portal.core.controller.coordination.AliasBindingInfo;
+import org.jboss.portal.core.controller.coordination.EventWiringInfo;
+import org.jboss.portal.core.controller.coordination.WindowBindingInfo;
+import org.jboss.portal.core.impl.coordination.CoordinationService;
+import org.jboss.portal.core.model.content.ContentType;
import org.jboss.portal.core.model.portal.Context;
+import org.jboss.portal.core.model.portal.Page;
import org.jboss.portal.core.model.portal.Portal;
-import org.jboss.portal.core.model.portal.Page;
import org.jboss.portal.core.model.portal.Window;
-import org.jboss.portal.core.controller.coordination.EventWiringInfo;
-import org.jboss.portal.core.controller.coordination.WindowBindingInfo;
-import org.jboss.portal.core.controller.coordination.AliasBindingInfo;
-import org.jboss.portal.core.model.content.ContentType;
-import org.jboss.portal.core.impl.coordination.CoordinationService;
-import org.apache.log4j.Appender;
-import org.apache.log4j.ConsoleAppender;
-import org.apache.log4j.SimpleLayout;
-import org.apache.log4j.Logger;
-import org.apache.log4j.Level;
-import junit.framework.TestSuite;
+import org.jboss.portal.test.core.model.portal.AbstractPortalObjectContainerTestCase;
import javax.xml.namespace.QName;
-import java.util.Map;
+import static java.lang.Boolean.FALSE;
+import static java.lang.Boolean.TRUE;
+import java.util.Collection;
import java.util.HashMap;
-import java.util.Collection;
import java.util.HashSet;
+import java.util.Map;
/**
* @author <a href="mailto:boleslaw dot dawidowicz at redhat anotherdot
com">Boleslaw Dawidowicz</a>
@@ -228,15 +229,15 @@
assertEquals(1, events.size());
- EventWiringInfo info = events.iterator().next();
- assertEquals("event1", info.getName());
+ EventWiringInfo originalInfo = events.iterator().next();
+ assertEquals("event1", originalInfo.getName());
events = cos.getEventSourceWirings(w1);
assertNotNull(events);
assertEquals(1, events.size());
- info = events.iterator().next();
+ EventWiringInfo info = events.iterator().next();
assertTrue(info.getSources().keySet().size() == 3);
assertTrue(info.getSources().keySet().contains(w1));
@@ -246,23 +247,23 @@
events = cos.getEventDestinationWirings(w4);
assertNotNull(events);
- assertTrue(events.size() == 1);
+ assertEquals(1, events.size());
info = events.iterator().next();
- assertTrue(info.getDestinations().keySet().size() == 1);
+ assertEquals(1, info.getDestinations().keySet().size());
assertTrue(info.getDestinations().keySet().contains(w4));
// remove
- cos.removeEventWiring(info);
+ cos.removeEventWiring(originalInfo);
+ events = cos.getEventWirings(page1);
+ assertNotNull(events);
+ assertTrue(events.isEmpty());
+
events = cos.getEventDestinationWirings(w4);
-
assertNotNull(events);
- assertTrue(events.size() == 0);
-
-
-
+ assertTrue(events.isEmpty());
TransactionAssert.commitTransaction();
}
Show replies by date