public void CanSetPrecision() { var hbm = new HbmColumn(); var mapper = new ColumnMapper(hbm, "aColumn"); mapper.Precision(12); hbm.precision.Should().Be("12"); mapper.Executing(m => m.Precision(0)).Throws <ArgumentOutOfRangeException>(); mapper.Executing(m => m.Precision(-1)).Throws <ArgumentOutOfRangeException>(); }
public void CanSetScale() { var hbm = new HbmColumn(); var mapper = new ColumnMapper(hbm, "aColumn"); mapper.Scale(3); hbm.scale.Should().Be("3"); mapper.Executing(m => m.Scale(0)).NotThrows(); mapper.Executing(m => m.Scale(-1)).Throws <ArgumentOutOfRangeException>(); }
public void CanSetLength() { var hbm = new HbmColumn(); var mapper = new ColumnMapper(hbm, "aColumn"); mapper.Length(50); hbm.length.Should().Be("50"); mapper.Executing(m => m.Length(0)).Throws <ArgumentOutOfRangeException>(); mapper.Executing(m => m.Length(-1)).Throws <ArgumentOutOfRangeException>(); }