Exemplo n.º 1
0
        public void HasColumnType_configures_when_unset()
        {
            var innerConfig = new PrimitivePropertyConfiguration();
            var config      = new LightweightPropertyConfiguration(new MockPropertyInfo(), () => innerConfig);

            var result = config.HasColumnType("int");

            Assert.Equal("int", innerConfig.ColumnType);
            Assert.Same(config, result);
        }
        public void HasColumnType_is_noop_when_set()
        {
            var innerConfig = new PrimitivePropertyConfiguration
                                  {
                                      ColumnType = "int"
                                  };
            var config = new LightweightPropertyConfiguration(new MockPropertyInfo(), () => innerConfig);

            var result = config.HasColumnType("long");

            Assert.Equal("int", innerConfig.ColumnType);
            Assert.Same(config, result);
        }