protected void TestPutAll(IRemoteCache <string, string> cache)
        {
            cache.Remove(K1);
            cache.Remove(K2);
            ulong before = cache.Size();
            IDictionary <string, string> entries = new Dictionary <string, string>();

            entries.Add(K1, V1);
            entries.Add(K2, V2);
            cache.PutAll(entries);
            Assert.AreEqual(before + 2, cache.Size());
        }
Example #2
0
        public void PutAllTest()
        {
            ulong initialSize = cache.Size();

            String key1 = UniqueKey.NextKey();
            String key2 = UniqueKey.NextKey();
            String key3 = UniqueKey.NextKey();

            Dictionary <String, String> map = new Dictionary <String, String>();

            map.Add(key1, "v1");
            map.Add(key2, "v2");
            map.Add(key3, "v3");

            cache.PutAll(map);
            Assert.AreEqual(initialSize + 3, cache.Size());
            Assert.AreEqual("v1", cache.Get(key1));
            Assert.AreEqual("v2", cache.Get(key2));
            Assert.AreEqual("v3", cache.Get(key3));
        }