public void GetRawValue() { SqlType type = new SqlNText("ру́сский", ParameterDirection.Input); Assert.AreEqual("ру́сский", type.GetRawValue()); type = new SqlNText(null, ParameterDirection.Input); Assert.Null(type.GetRawValue()); }
public void GetParameter() { SqlType type = new SqlNText("ру́сский", ParameterDirection.Input); TestHelper.AssertSqlParameter(type.GetParameter(), SqlDbType.NText, "ру́сский", size: -1); type = new SqlNText(null, ParameterDirection.Input); TestHelper.AssertSqlParameter(type.GetParameter(), SqlDbType.NText, DBNull.Value, size: -1); }
public void CreateMetaData() { Assert.Throws<TypeCannotBeUsedAsAClrTypeException>(() => SqlNText.GetTypeHandler().CreateMetaData(null)); SqlTypeHandler col = new SqlNText("ру́сский", ParameterDirection.Input); var meta = col.CreateMetaData("Test"); Assert.AreEqual(SqlDbType.NText, meta.SqlDbType); Assert.AreEqual(-1, meta.MaxLength); Assert.AreEqual("Test", meta.Name); }
public void CreateMetaData() { Assert.Throws <TypeCannotBeUsedAsAClrTypeException>(() => SqlNText.GetTypeHandler().CreateMetaData(null)); SqlTypeHandler col = new SqlNText("ру́сский", ParameterDirection.Input); var meta = col.CreateMetaData("Test"); Assert.AreEqual(SqlDbType.NText, meta.SqlDbType); Assert.AreEqual(-1, meta.MaxLength); Assert.AreEqual("Test", meta.Name); }
public void CreateParamFromValue() { Assert.Throws <TypeCannotBeUsedAsAClrTypeException>(() => SqlNText.GetTypeHandler().CreateParamFromValue("Test", null)); }
public void GetTypeHandler() { Assert.IsInstanceOf <SqlTypeHandler>(SqlNText.GetTypeHandler()); }