示例#1
0
        public void Test_AddRecord()
        {
            var instance = new ALModel(null);

            var aqm = new Aquarium();

            instance.AddRecord(aqm);
            Assert.IsNotNull(instance.GetRecord <Aquarium>(aqm.Id));
        }
示例#2
0
        public void Test_CollectData()
        {
            var instance = new ALModel(null);

            instance.CollectData(null);

            var aqm = new Aquarium();

            aqm.Name = "test aquarium";
            instance.AddRecord(aqm);

            instance.CollectData(aqm);
        }
示例#3
0
        public void Test_UpdateRecord()
        {
            var instance = new ALModel(null);

            var aqm = new Aquarium();

            aqm.Name = "test aquarium";
            instance.AddRecord(aqm);
            aqm = instance.GetRecord <Aquarium>(aqm.Id);
            Assert.AreEqual("test aquarium", aqm.Name);

            aqm.Name = "test2";
            instance.UpdateRecord(aqm);
            var aqm2 = instance.GetRecord <Aquarium>(aqm.Id);

            Assert.AreEqual("test2", aqm2.Name);
        }
示例#4
0
        public void Test_CleanSpace()
        {
            var instance = new ALModel(null);

            instance.CleanSpace();
        }
示例#5
0
        public void Test_ctor()
        {
            var instance = new ALModel(null);

            Assert.IsNotNull(instance);
        }