3 using System.Data.SqlClient;
\r
5 using MonoTests.System.Data.Utils;
\r
7 using NUnit.Framework;
\r
9 namespace MonoTests.System.Data.SqlClient
\r
12 public class SqlParameter_ctor_SO : GHTBase
\r
14 private Exception exp = null;
\r
16 public static void Main()
\r
18 SqlParameter_ctor_SO tc = new SqlParameter_ctor_SO();
\r
21 tc.BeginTest("SqlParameter_ctor_SO");
\r
30 // Every Test must End with EndTest
\r
37 CreateParamWithTypeBoolTrue();
\r
38 CreateParamWithTypeBoolFalse();
\r
41 [Test(Description="Create an SqlParameter with value of type bool (true)")]
\r
42 public void CreateParamWithTypeBoolTrue()
\r
44 if (ConnectedDataProvider.GetDbType() != DataBaseServer.SQLServer) {
\r
45 //All tests in this class are only for MSSQLServer.
\r
46 Log(string.Format("All tests in this class are only for MSSQLServer and cannot be tested on {0}", ConnectedDataProvider.GetDbType()));
\r
53 BeginCase("Create an SqlParameter with value of type bool (true)");
\r
54 SqlParameter p = new SqlParameter("name", true);
\r
55 Compare(p.Value.GetType(), typeof(bool));
\r
56 Compare(p.DbType, DbType.Boolean);
\r
57 Compare(p.SqlDbType, SqlDbType.Bit);
\r
70 [Test(Description="Create an SqlParameter with value of type bool (false)")]
\r
71 public void CreateParamWithTypeBoolFalse()
\r
73 if (ConnectedDataProvider.GetDbType() != DataBaseServer.SQLServer) {
\r
74 //All tests in this class are only for MSSQLServer.
\r
75 Log(string.Format("All tests in this class are only for MSSQLServer and cannot be tested on {0}", ConnectedDataProvider.GetDbType()));
\r
82 BeginCase("Create an SqlParameter with value of type bool (false)");
\r
83 SqlParameter p = new SqlParameter("name", false);
\r
84 Compare(p.Value.GetType(), typeof(bool));
\r
85 Compare(p.DbType, DbType.Boolean);
\r
86 Compare(p.SqlDbType, SqlDbType.Bit);
\r