public void DeleteTest() { ProgDec progDec = new ProgDec(); ProgDecList progDecs = new ProgDecList(); progDecs.Load(); progDec = progDecs.Where(p => p.StudentId == -99).FirstOrDefault(); int result = progDec.Delete(); Assert.IsTrue(result > 0); }
public void UpdateTest() { ProgDec progDec = new ProgDec(); ProgDecList progDecs = new ProgDecList(); progDecs.Load(); progDec = progDecs.Where(p => p.StudentId == -99).FirstOrDefault(); progDec.ProgramId = 5; progDec.Update(); ProgDec updatedProgDec = new ProgDec(); updatedProgDec.Id = progDec.Id; updatedProgDec.LoadById(); Assert.AreEqual(progDec.ProgramId, updatedProgDec.ProgramId); }