Пример #1
0
        public void ValidateData()
        {
            o_region = new RegionOperation(RegionName);
            DefaultType dc = (DefaultType)o_region.Region.Get("key-1", null);

            Assert.AreEqual(dc.CBool, true, "bool is not equal");
            Assert.AreEqual(dc.CInt, 1000, "int is not equal");

            int[] cia = dc.CIntArray;
            Assert.IsNotNull(cia, "Int array is null");
            Assert.AreEqual(3, cia.Length, "Int array are not three");

            string[] csa = dc.CStringArray;
            Assert.IsNotNull(csa, "String array is null");
            Assert.AreEqual(2, csa.Length, "String array length is not two");

            Assert.AreEqual(dc.CFileName, "gemstone.txt", "Cacheable filename is not equal");

            /*
             * Assert.IsNotNull(dc.CHashSet, "hashset is null");
             * Assert.AreEqual(2, dc.CHashSet.Count, "hashset size is not two");
             * */

            Assert.IsNotNull(dc.CHashMap, "hashmap is null");
            Assert.AreEqual(1, dc.CHashMap.Count, "hashmap size is not one");

            //Assert.IsNotNull(dc.CDate, "Date is null");

            Assert.IsNotNull(dc.CVector);
            Assert.AreEqual(2, dc.CVector.Count, "Vector size is not two");

            //Assert.IsNotNull(dc.CObject);
            //Assert.AreEqual("key", ((CustomSerializableObject)dc.CObject).key, "Object key is not same");
            //Assert.AreEqual("value", ((CustomSerializableObject)dc.CObject).value, "Object value is not same");
        }
Пример #2
0
        public void CallOp2()
        {
            o_region = new RegionOperation(RegionName);
            DefaultType dc = new DefaultType(true);

            o_region.Region.Put("key-1", dc, null);
            Thread.Sleep(1000); // let the events reach at other end.
        }