Ejemplo n.º 1
0
        protected void TestPutGetBulk(IRemoteCache <string, string> cache)
        {
            cache.Remove(K1);
            cache.Remove(K2);
            ulong before = cache.Size();

            cache.Put(K1, V1);
            cache.Put(K2, V2);
            Assert.AreEqual(before + 2, cache.GetBulk().Count);
        }
Ejemplo n.º 2
0
        public void GetBulkTest()
        {
            String key1 = UniqueKey.NextKey();
            String key2 = UniqueKey.NextKey();
            String key3 = UniqueKey.NextKey();

            cache.Put(key1, "hydrogen");
            cache.Put(key2, "helium");
            cache.Put(key3, "lithium");

            IDictionary <String, String> data;

            data = cache.GetBulk();
            Assert.AreEqual("hydrogen", data[key1]);
            Assert.AreEqual("helium", data[key2]);
            Assert.AreEqual("lithium", data[key3]);

            data = cache.GetBulk(2);
            Assert.AreEqual(data.Count, 2);
        }