Example #1
0
        public void testSimple()
        {
            TCacheS obj1 = new TCacheS();

            obj1.Name    = "n1";
            obj1.Address = "a1";
            obj1.IsDone  = false;
            obj1.insert();

            TCacheS obj2 = new TCacheS();

            obj2.Name    = "n2";
            obj2.Address = "a2";
            obj2.IsDone  = true;
            obj2.insert();

            List <TCacheS> list = cdb.findAll <TCacheS>();

            Assert.AreEqual(2, list.Count);

            Assert.AreEqual(obj1.Name, list[0].Name);
            Assert.AreEqual(obj1.Address, list[0].Address);
            Assert.AreEqual(obj1.IsDone, list[0].IsDone);

            Assert.AreEqual(obj2.Name, list[1].Name);
            Assert.AreEqual(obj2.Address, list[1].Address);
            Assert.AreEqual(obj2.IsDone, list[1].IsDone);
        }
        public void testSimple()
        {
            TCacheS obj1 = new TCacheS();
            obj1.Name = "n1";
            obj1.Address = "a1";
            obj1.IsDone = false;
            obj1.insert();

            TCacheS obj2 = new TCacheS();
            obj2.Name = "n2";
            obj2.Address = "a2";
            obj2.IsDone = true;
            obj2.insert();

            List<TCacheS> list = cdb.findAll<TCacheS>();
            Assert.AreEqual( 2, list.Count );

            Assert.AreEqual( obj1.Name, list[0].Name );
            Assert.AreEqual( obj1.Address, list[0].Address );
            Assert.AreEqual( obj1.IsDone, list[0].IsDone );

            Assert.AreEqual( obj2.Name, list[1].Name );
            Assert.AreEqual( obj2.Address, list[1].Address );
            Assert.AreEqual( obj2.IsDone, list[1].IsDone );
        }