[jboss-cvs] JBossAS SVN: r107004 - projects/cluster/ha-server-cache-ispn/trunk/src/test/java/org/jboss/ha/web/tomcat/service/session/distributedcache/impl.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Wed Jul 21 16:22:02 EDT 2010


Author: pferraro
Date: 2010-07-21 16:22:02 -0400 (Wed, 21 Jul 2010)
New Revision: 107004

Modified:
   projects/cluster/ha-server-cache-ispn/trunk/src/test/java/org/jboss/ha/web/tomcat/service/session/distributedcache/impl/DistributedCacheManagerTest.java
Log:
More unit test progress

Modified: projects/cluster/ha-server-cache-ispn/trunk/src/test/java/org/jboss/ha/web/tomcat/service/session/distributedcache/impl/DistributedCacheManagerTest.java
===================================================================
--- projects/cluster/ha-server-cache-ispn/trunk/src/test/java/org/jboss/ha/web/tomcat/service/session/distributedcache/impl/DistributedCacheManagerTest.java	2010-07-21 20:14:35 UTC (rev 107003)
+++ projects/cluster/ha-server-cache-ispn/trunk/src/test/java/org/jboss/ha/web/tomcat/service/session/distributedcache/impl/DistributedCacheManagerTest.java	2010-07-21 20:22:02 UTC (rev 107004)
@@ -36,6 +36,7 @@
 import org.infinispan.lifecycle.ComponentStatus;
 import org.infinispan.manager.CacheContainer;
 import org.infinispan.manager.EmbeddedCacheManager;
+import org.infinispan.notifications.cachelistener.event.CacheEntryActivatedEvent;
 import org.infinispan.notifications.cachelistener.event.CacheEntryModifiedEvent;
 import org.infinispan.notifications.cachelistener.event.CacheEntryRemovedEvent;
 import org.infinispan.transaction.tm.BatchModeTransactionManager;
@@ -738,4 +739,32 @@
       EasyMock.verify(this.manager, this.container, this.storage, this.cache, this.invoker, event, map);
       EasyMock.reset(this.manager, this.container, this.storage, this.cache, this.invoker, event, map);
    }
+   
+   @Test
+   public void activated()
+   {
+      CacheEntryActivatedEvent event = EasyMock.createNiceMock(CacheEntryActivatedEvent.class);
+      
+      DistributedCacheManagerImpl<OutgoingDistributableSessionData> manager = this.startDistributedCacheManager();
+      
+      EasyMock.expect(this.manager.isPassivationEnabled()).andReturn(false);
+      
+      EasyMock.replay(this.manager, this.container, this.storage, this.cache, this.invoker, event);
+      
+      manager.activated(event);
+      
+      EasyMock.verify(this.manager, this.container, this.storage, this.cache, this.invoker, event);
+      EasyMock.reset(this.manager, this.container, this.storage, this.cache, this.invoker, event);
+      
+      
+      EasyMock.expect(this.manager.isPassivationEnabled()).andReturn(true);
+      this.manager.sessionActivated();
+      
+      EasyMock.replay(this.manager, this.container, this.storage, this.cache, this.invoker, event);
+      
+      manager.activated(event);
+      
+      EasyMock.verify(this.manager, this.container, this.storage, this.cache, this.invoker, event);
+      EasyMock.reset(this.manager, this.container, this.storage, this.cache, this.invoker, event);
+   }
 }



More information about the jboss-cvs-commits mailing list