Ejemplo n.º 1
0
 public void SelectWjereInvalidStatement()
 {
     ACAD food = new CADType("GebatDataConnectionString");
     food.SelectWhere("Name = ; ");
 }
Ejemplo n.º 2
0
        public void SelectWhereFailConn()
        {
            setFailConn();

            ACAD food = new CADType("GebatDataConnectionString");
            food.SelectWhere("Name = 'Kg'");
        }
Ejemplo n.º 3
0
 public void SelectWhereInvalidStart()
 {
     ACAD food = new CADType("GebatDataConnectionString");
     food.SelectWhere("Name = 'Kg'", -3);
 }
Ejemplo n.º 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"]);
            }
        }