public void GetParameter() { SqlType col = new SqlStructured("MyType", null); var param = col.GetParameter(); TestHelper.AssertSqlParameter(param, SqlDbType.Structured, DBNull.Value); col = new SqlStructured("MyType", value); param = col.GetParameter(); Assert.AreEqual(SqlDbType.Structured, param.SqlDbType); Assert.AreEqual("MyType", param.TypeName); Assert.AreEqual(typeof(StructuredDynamicYielder), param.Value.GetType()); Assert.AreEqual(2, ((IEnumerable<SqlDataRecord>)param.Value).Count()); }
public void GetRawValue() { SqlType col = new SqlStructured("A", null); Assert.Throws<InvalidOperationException>(() => col.GetRawValue()); }