public void TestCheckDatesForStatusChanges() { Prescription p = new Prescription(100000, 1, "Test-Prescription", "Test-Notes", new DateTime(2013,4,6), new DateTime(2013,4,6), "Upcoming"); p.Insert(); Prescription.CheckDatesForStatusChanges(); p.Select(); Assert.True(p.Status == "History"); p.Delete(); }
public void TestGetPrescriptions() { Prescription p = new Prescription(100000, 1, "Test-Prescription", "Test-Notes", new DateTime(), new DateTime(), "Test"); p.Insert(); List<Prescription> list = Prescription.GetPrescriptions(100000, "Test"); Assert.True(list.Count >= 1); Prescription prescription = list[0]; prescription.Delete(); }
public void TestPrescriptionUpdate() { Prescription p = new Prescription(100000, 1, "Test-Prescription", "Test-Notes", new DateTime(), new DateTime(), "Test"); p.Insert(); List<Prescription> list = Prescription.GetPrescriptions(100000, "Test"); Prescription prescription = list[0]; prescription.Notes = "TEST NOTES"; Assert.True(prescription.Update()); prescription.Delete(); }