Example #1
0
        public void SelectConnFail()
        {
            setFailConn();

            ACAD          food = new CADType("GebatDataConnectionString");
            List <object> ids  = new List <object>();

            ids.Add(2);
            food.Select(ids);
        }
Example #2
0
        public void SelectInvalidNumberId()
        {
            List <object> ids = new List <object>();

            ids.Add("hola");
            ids.Add(3);
            ACAD food = new CADType("GebatDataConnectionString");

            food.Select(ids);
        }
Example #3
0
        public void TestSelectOne()
        {
            string        expected = "Kg";
            ACAD          food     = new CADType("GebatDataConnectionString");
            List <object> ids      = new List <object>();

            ids.Add((int)1);
            DataRow actual = food.Select(ids);

            Assert.AreEqual(actual["Name"].ToString(), expected);
        }
Example #4
0
        public void Select()
        {
            ACAD          food = new CADType("GebatDataConnectionString");
            List <object> ids  = new List <object>();

            ids.Add(1);
            DataRow   actual   = food.Select(ids);
            DataTable table    = tableFormat;
            DataRow   expected = table.NewRow();

            expected["Id"]   = 1;
            expected["Name"] = "Kg";

            Assert.AreEqual(expected["Id"], actual["Id"]);
            Assert.AreEqual(expected["Name"], actual["Name"]);
        }
Example #5
0
        public void SelectVoidList()
        {
            ACAD food = new CADType("GebatDataConnectionString");

            food.Select(null);
        }