public void GetRawValue() { SqlType type = new SqlSmallMoney(5.27m, ParameterDirection.Input); Assert.AreEqual(5.27m, type.GetRawValue()); type = new SqlSmallMoney(null, ParameterDirection.Input); Assert.Null(type.GetRawValue()); }
public void GetParameter() { SqlType type = new SqlSmallMoney(5.27m, ParameterDirection.Input); TestHelper.AssertSqlParameter(type.GetParameter(), SqlDbType.SmallMoney, 5.27m); type = new SqlSmallMoney(null, ParameterDirection.Input); TestHelper.AssertSqlParameter(type.GetParameter(), SqlDbType.SmallMoney, DBNull.Value); }
public void CreateMetaData() { Assert.Throws<TypeCannotBeUsedAsAClrTypeException>(() => SqlSmallMoney.GetTypeHandler().CreateMetaData(null)); SqlTypeHandler col = new SqlSmallMoney(5.27m, ParameterDirection.Input); var meta = col.CreateMetaData("Test"); Assert.AreEqual(SqlDbType.SmallMoney, meta.SqlDbType); Assert.AreEqual("Test", meta.Name); }
public void CreateMetaData() { Assert.Throws <TypeCannotBeUsedAsAClrTypeException>(() => SqlSmallMoney.GetTypeHandler().CreateMetaData(null)); SqlTypeHandler col = new SqlSmallMoney(5.27m, ParameterDirection.Input); var meta = col.CreateMetaData("Test"); Assert.AreEqual(SqlDbType.SmallMoney, meta.SqlDbType); Assert.AreEqual("Test", meta.Name); }
public void CreateParamFromValue() { Assert.Throws <TypeCannotBeUsedAsAClrTypeException>(() => SqlSmallMoney.GetTypeHandler().CreateParamFromValue("Test", null)); }
public void GetTypeHandler() { Assert.IsInstanceOf <SqlTypeHandler>(SqlSmallMoney.GetTypeHandler()); }