public void ShouldMapDBColumn() { var mapper = new FluentColumnMapper(); var column = new Column { Name = "Age", DataType = "Int", IsNullable = true }; Assert.That(mapper.Map(column, "Age", new PascalCaseTextFormatter()), Is.EqualTo("Map(x => x.Age).Column(\"Age\");")); }
public void ShouldMapDBColumnWithProperties() { var mapper = new FluentColumnMapper(); var column = new Column { Name = "Name", DataLength = 16, DataType = "varchar", IsForeignKey = false, IsNullable = false, IsPrimaryKey = false, MappedDataType = "string" }; Assert.That(mapper.Map(column, "Name", new PascalCaseTextFormatter()), Is.EqualTo("Map(x => x.Name).Column(\"Name\").Not.Nullable().Length(16);")); }