Пример #1
0
        public void Creation()
        {
            var TempMappingObject = new MockMapping();
            var TestObject        = new ID <AllReferencesAndID, int>(x => x.ID, TempMappingObject);

            Assert.NotNull(TestObject);
            Assert.False(TestObject.AutoIncrement);
            Assert.Equal("ID_", TestObject.ColumnName);
            Assert.NotNull(TestObject.CompiledExpression);
            Assert.Empty(TestObject.ComputedColumnSpecification);
            Assert.Empty(TestObject.Constraints);
            Assert.Equal(0, TestObject.DefaultValue());
            Assert.True(TestObject.Index);
            Assert.Equal("_IDDerived", TestObject.InternalFieldName);
            Assert.Equal(0, TestObject.MaxLength);
            Assert.Equal("ID", TestObject.Name);
            Assert.False(TestObject.Nullable);
            Assert.Same(TempMappingObject, TestObject.ParentMapping);
            Assert.Equal(typeof(int), TestObject.PropertyType);
            Assert.False(TestObject.ReadOnly);
            Assert.Equal("System.Int32", TestObject.TypeName);
            Assert.True(TestObject.Unique);
        }
Пример #2
0
 public ReferenceTests()
 {
     MappingObject = new MockMapping();
 }
Пример #3
0
 public IDTests()
 {
     MappingObject = new MockMapping();
 }