Пример #1
0
        public void GetTableTest()
        {
            var db = new DbInfo();

            db.Register <TestModel>("TestTable").SetFields(
                new DbFieldInfo("IntProperty", "IntField"),
                new DbFieldInfo("StringProperty", "StringField"));

            var test = db.GetTable <TestModel>();

            Assert.AreEqual("TestTable", test.TableName);
            Assert.AreEqual(typeof(TestModel), test.ModelType);
            Assert.AreEqual(null, test.Token);
            Assert.AreEqual(2, test.FieldInfoList.Count);
        }