コード例 #1
0
        public void TestGetAllOK()
        {
            SetUpDB();
            PartMapper pm = new PartMapper();
            ArrayList  a  = pm.GetAllParts(conn);

            TearDown();
            Assert.AreEqual(a.Count, 3);
        }
コード例 #2
0
        public void TestDeletePartFail()
        {
            SetUpDB();
            PartMapper pm          = new PartMapper();
            int        rowsupdated = pm.DeletePart(4, conn);
            ArrayList  a           = pm.GetAllParts(conn);

            TearDown();
            Assert.AreEqual(rowsupdated, 0);
            Assert.AreEqual(a.Count, 3);
        }
コード例 #3
0
        public void TestGetAllEmpty()
        {
            SetUpDB();
            PartMapper pm = new PartMapper();

            pm.DeletePart(1, conn);
            pm.DeletePart(2, conn);
            pm.DeletePart(3, conn);
            ArrayList a = pm.GetAllParts(conn);

            TearDown();
            Assert.AreEqual(a.Count, 0);
        }