示例#1
0
 public void SelectWjereInvalidStatement()
 {
     ACAD food = new CADType("GebatDataConnectionString");
     food.SelectWhere("Name = ; ");
 }
示例#2
0
        public void SelectWhereFailConn()
        {
            setFailConn();

            ACAD food = new CADType("GebatDataConnectionString");
            food.SelectWhere("Name = 'Kg'");
        }
示例#3
0
 public void SelectWhereInvalidStart()
 {
     ACAD food = new CADType("GebatDataConnectionString");
     food.SelectWhere("Name = 'Kg'", -3);
 }
示例#4
0
        public void SelectWhere()
        {
            ACAD food = new CADType("GebatDataConnectionString");
            DataTable expected = tableFormat;
            DataRow row = expected.NewRow();
            row["Id"] = 1;
            row["Name"] = "Kg";
            expected.Rows.Add(row);
            DataTable actual = food.SelectWhere("Name = 'Kg'");

            for (int i = 0; i < expected.Rows.Count; i++)
            {
                Assert.AreEqual(expected.Rows[i]["Id"], actual.Rows[i]["Id"]);
                Assert.AreEqual(expected.Rows[i]["Name"], actual.Rows[i]["Name"]);
            }
        }