private void testVariables(DosageDbRecord o, string id, TypeOfTreatment typeOfTreatment, string personId, string medicineId, DateTime vFrom, DateTime vTo) { Assert.AreEqual(id, o.ID); Assert.AreEqual(typeOfTreatment, o.TypeOfTreatment); Assert.AreEqual(personId, o.PersonID); Assert.AreEqual(medicineId, o.MedicineID); Assert.AreEqual(vFrom, o.ValidFrom); Assert.AreEqual(vTo, o.ValidTo); }
public static DosageObject Create(string id, TypeOfTreatment typeOfTreatment, string personId, string medicineId, DateTime?validFrom = null, DateTime?validTo = null) { var o = new DosageDbRecord { ID = id, TypeOfTreatment = typeOfTreatment, PersonID = personId, MedicineID = medicineId, ValidFrom = validFrom ?? DateTime.MinValue, ValidTo = validTo ?? DateTime.MaxValue }; return(new DosageObject(o)); }
public static DosageObject Create(DosageDbRecord dbrecord) { return(new DosageObject(dbrecord)); }