public void TestGetAllOK() { SetUpDB(); PartMapper pm = new PartMapper(); ArrayList a = pm.GetAllParts(conn); TearDown(); Assert.AreEqual(a.Count, 3); }
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); }
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); }