Author: manik.surtani(a)jboss.com
Date: 2008-07-01 09:31:16 -0400 (Tue, 01 Jul 2008)
New Revision: 6138
Modified:
core/trunk/src/test/java/org/jboss/cache/commands/write/EvictCommandTest.java
Log:
Eviction code moved to the command
Modified: core/trunk/src/test/java/org/jboss/cache/commands/write/EvictCommandTest.java
===================================================================
---
core/trunk/src/test/java/org/jboss/cache/commands/write/EvictCommandTest.java 2008-07-01
06:19:50 UTC (rev 6137)
+++
core/trunk/src/test/java/org/jboss/cache/commands/write/EvictCommandTest.java 2008-07-01
13:31:16 UTC (rev 6138)
@@ -50,10 +50,9 @@
{
expect(container.peek(testFqn, false, true)).andReturn(nodes.abNode);
notifier.notifyNodeEvicted(testFqn, true, ctx);
- expect(container.evict(testFqn)).andReturn(true);
notifier.notifyNodeEvicted(testFqn, false, ctx);
control.replay();
- assert Boolean.TRUE == command.perform(ctx);
+ assert Boolean.FALSE == command.perform(ctx);
control.verify();
}
@@ -68,13 +67,13 @@
expect(container.getNodesForEviction(testFqn, true)).andReturn(nodesToEvict);
control.checkOrder(false);
//evict a
+ expect(container.peek(nodes.a, false, true)).andReturn(nodes.aNode);
notifier.notifyNodeEvicted(nodes.a, true, ctx);
- expect(container.evict(nodes.a)).andReturn(true);
notifier.notifyNodeEvicted(nodes.a, false, ctx);
//evict b
+ expect(container.peek(nodes.ab, false, true)).andReturn(nodes.abNode);
notifier.notifyNodeEvicted(nodes.ab, true, ctx);
- expect(container.evict(nodes.ab)).andReturn(true);
notifier.notifyNodeEvicted(nodes.ab, false, ctx);
control.replay();
Show replies by date