コード例 #1
0
        public void DefaultType()
        {
            var test = new TestObjectDefault();
            var data = IQ.MapperCache.GetOrCreateObjectData(test);

            Assert.IsTrue(data.ClassInfo.PrimaryKeyField.Name == "DefaultPK");
            Assert.AreEqual(data.ClassInfo.FieldNames.Count(), 6, "Has five fields");

            data.SetPrimaryKey(123);
            Assert.AreEqual(123, test.DefaultPK, "PK was set");
        }
コード例 #2
0
ファイル: Objects.cs プロジェクト: jamietre/IQMap
        public void DefaultType()
        {
            var test = new TestObjectDefault();
            var data = IQ.MapperCache.GetOrCreateObjectData(test);

            Assert.IsTrue(data.ClassInfo.PrimaryKeyField.Name == "DefaultPK");
            Assert.AreEqual(data.ClassInfo.FieldNames.Count(), 6, "Has five fields");

            data.SetPrimaryKey(123);
            Assert.AreEqual(123, test.DefaultPK, "PK was set");
        }