예제 #1
0
            public void Apply(object cache)
            {
                var slot = new ByteArrayBuffer(0);

                ((IClientSlotCache)cache).Add(_enclosing.Trans(), 42, slot);
                operation.Apply(_enclosing.Trans());
                Assert.IsNull(((IClientSlotCache)cache).Get(_enclosing.Trans(), 42));
            }
예제 #2
0
 public void Apply(object cache)
 {
     ((IClientSlotCache)cache).Add(_enclosing.Trans(), 42, new ByteArrayBuffer(0)
                                   );
     ((IClientSlotCache)cache).Add(_enclosing.Trans(), 42, new ByteArrayBuffer(1)
                                   );
     Assert.AreEqual(1, ((IClientSlotCache)cache).Get(_enclosing.Trans(), 42).Length
                         ());
 }
예제 #3
0
            public void Apply(object cache)
            {
                var items = _enclosing.NewQuery(typeof(Item))
                            .Execute();

                Assert.IsNotNull(((IClientSlotCache)cache).Get(_enclosing.Trans(), id));
                Assert.IsNotNull(((Item)items.Next()));
                Assert.IsNull(((IClientSlotCache)cache).Get(_enclosing.Trans(), id),
                              "activation should have purged slot from cache"
                              );
            }
예제 #4
0
 public void Apply(object cache)
 {
     for (var i = 0; i < SlotCacheSize + 1; i++)
     {
         ((IClientSlotCache)cache).Add(_enclosing.Trans(), i, new ByteArrayBuffer(i));
     }
     for (var i = 1; i < SlotCacheSize + 1; i++)
     {
         Assert.AreEqual(i, ((IClientSlotCache)cache).Get(_enclosing.Trans(), i).Length
                             ());
     }
     Assert.IsNull(((IClientSlotCache)cache).Get(_enclosing.Trans(), 0));
 }