Exemple #1
0
        public void CreateMetaData()
        {
            Assert.Throws <TypeCannotBeUsedAsAClrTypeException>(() => SqlText.GetTypeHandler().CreateMetaData(null));

            SqlTypeHandler col  = new SqlText("Test", ParameterDirection.Input);
            var            meta = col.CreateMetaData("Test");

            Assert.AreEqual(SqlDbType.Text, meta.SqlDbType);
            Assert.AreEqual(-1, meta.MaxLength);
            Assert.AreEqual("Test", meta.Name);
        }
Exemple #2
0
 public void CreateParamFromValue()
 {
     Assert.Throws <TypeCannotBeUsedAsAClrTypeException>(() => SqlText.GetTypeHandler().CreateParamFromValue("Test", null));
 }
Exemple #3
0
 public void GetTypeHandler()
 {
     Assert.IsInstanceOf <SqlTypeHandler>(SqlText.GetTypeHandler());
 }