Esempio n. 1
0
        public void MapSetClear()
        {
            JsonMapSet map = "HENRY_INFO";
            UserBase   ub  = new UserBase();

            ub.Name    = "henryfan";
            ub.City    = "gz";
            ub.Counrty = "cn";
            ub.Age     = 10;
            Contact contact = new Contact();

            contact.EMail = "*****@*****.**";
            contact.QQ    = "28304340";
            contact.Phone = "13660223497";
            map.Set(ub, contact);
            map.Clear();
            IList <object> data = map.Get <UserBase, Contact>();

            Assert.AreEqual(null, data[0]);
            Assert.AreEqual(null, data[1]);
        }
Esempio n. 2
0
        public void MapSetClear()
        {
            JsonMapSet map = "John_info";
            UserBase   ub  = new UserBase();

            ub.Name    = "john";
            ub.Country = "cn";
            ub.City    = "wx";
            ub.Age     = 10;
            Contract contract = new Contract();

            contract.Phone = "345345345";
            contract.Email = "sjo@awd";
            contract.QQ    = "asdad";
            map.Set(ub, contract);
            map.Clear();

            IList <object> data = map.Get <UserBase, Contract>();

            Assert.AreEqual(null, data[0]);
            Assert.AreEqual(null, data[1]);
        }