public void Can_set_column_facets_from_fluent_method_optional_args() { var column = new ParameterBuilder().String( maxLength: 42, fixedLength: false, unicode: true, name: "Foo", storeType: "Bar", defaultValue: "123", defaultValueSql: "getdate()"); Assert.NotNull(column); var columnModel = column; Assert.Equal(42, columnModel.MaxLength); Assert.False(columnModel.IsFixedLength.Value); Assert.True(columnModel.IsUnicode.Value); Assert.Equal("Foo", columnModel.Name); Assert.Equal("Bar", columnModel.StoreType); Assert.Equal("123", columnModel.DefaultValue); Assert.Equal("getdate()", columnModel.DefaultValueSql); }
public ParameterModel String( int?maxLength = null, bool?fixedLength = null, bool?unicode = null, string defaultValue = null, string defaultValueSql = null, string name = null, string storeType = null, bool outParameter = false) { string str = defaultValue; string defaultValueSql1 = defaultValueSql; int? maxLength1 = maxLength; bool? nullable = fixedLength; byte? precision = new byte?(); byte? scale = new byte?(); bool? unicode1 = unicode; bool? fixedLength1 = nullable; string name1 = name; string storeType1 = storeType; int num = outParameter ? 1 : 0; return(ParameterBuilder.BuildParameter(PrimitiveTypeKind.String, (object)str, defaultValueSql1, maxLength1, precision, scale, unicode1, fixedLength1, name1, storeType1, num != 0)); }
public void Boolean_should_add_column_to_table_model() { var column = new ParameterBuilder().Boolean(); Assert.Equal(PrimitiveTypeKind.Boolean, column.Type); }
public void Geometry_should_add_column_to_table_model() { var column = new ParameterBuilder().Geometry(); Assert.Equal(PrimitiveTypeKind.Geometry, column.Type); }
public void DateTimeOffset_should_add_column_to_table_model() { var column = new ParameterBuilder().DateTimeOffset(); Assert.Equal(PrimitiveTypeKind.DateTimeOffset, column.Type); }
public void Integer_should_add_integer_column_to_table_model() { var column = new ParameterBuilder().Int(); Assert.Equal(PrimitiveTypeKind.Int32, column.Type); }
public void Integer_should_add_integer_column_to_table_model() { var column = new ParameterBuilder().Int(); Assert.Equal(PrimitiveTypeKind.Int32, column.Type); }
public void Short_should_add_column_to_table_model() { var column = new ParameterBuilder().Short(); Assert.Equal(PrimitiveTypeKind.Int16, column.Type); }
public void Single_should_add_column_to_table_model() { var column = new ParameterBuilder().Single(); Assert.Equal(PrimitiveTypeKind.Single, column.Type); }
public void Decimal_should_add_column_to_table_model() { var column = new ParameterBuilder().Decimal(); Assert.Equal(PrimitiveTypeKind.Decimal, column.Type); }
public void Boolean_should_add_column_to_table_model() { var column = new ParameterBuilder().Boolean(); Assert.Equal(PrimitiveTypeKind.Boolean, column.Type); }
public void Can_set_column_facets_from_fluent_method_optional_args() { var column = new ParameterBuilder().String( maxLength: 42, fixedLength: false, unicode: true, name: "Foo", storeType: "Bar", defaultValue: "123", defaultValueSql: "getdate()"); Assert.NotNull(column); var columnModel = column; Assert.Equal(42, columnModel.MaxLength); Assert.False(columnModel.IsFixedLength.Value); Assert.True(columnModel.IsUnicode.Value); Assert.Equal("Foo", columnModel.Name); Assert.Equal("Bar", columnModel.StoreType); Assert.Equal("123", columnModel.DefaultValue); Assert.Equal("getdate()", columnModel.DefaultValueSql); }
public void Geometry_should_add_column_to_table_model() { var column = new ParameterBuilder().Geometry(); Assert.Equal(PrimitiveTypeKind.Geometry, column.Type); }
public void DateTimeOffset_should_add_column_to_table_model() { var column = new ParameterBuilder().DateTimeOffset(); Assert.Equal(PrimitiveTypeKind.DateTimeOffset, column.Type); }
public void Decimal_should_add_column_to_table_model() { var column = new ParameterBuilder().Decimal(); Assert.Equal(PrimitiveTypeKind.Decimal, column.Type); }
public void Single_should_add_column_to_table_model() { var column = new ParameterBuilder().Single(); Assert.Equal(PrimitiveTypeKind.Single, column.Type); }
public void Short_should_add_column_to_table_model() { var column = new ParameterBuilder().Short(); Assert.Equal(PrimitiveTypeKind.Int16, column.Type); }
public void Long_should_add_column_to_table_model() { var column = new ParameterBuilder().Long(); Assert.Equal(PrimitiveTypeKind.Int64, column.Type); }
public void Long_should_add_column_to_table_model() { var column = new ParameterBuilder().Long(); Assert.Equal(PrimitiveTypeKind.Int64, column.Type); }