public void Setup() { var patient = new Data.DAO.Patient { Communication = new Data.DAO.Communication(), Description = new Data.DAO.Description(), Image = new Data.DAO.Image() }; mock = new Mock <Data.Repositories.IPatient>(); mock.Setup(p => p.InsertPatient(It.IsAny <Data.DAO.Patient>())); mock.Setup(p => p.SearchPatient(It.IsAny <Data.DAO.SearchCriteria>())).Returns(new List <Data.DAO.Patient>() { patient }); }
internal Patient(Data.DAO.Patient patient) { this.FirstName = patient.FirstName; this.LastName = patient.LastName; this.Gender = patient.Gender; this.DOB = patient.DOB; this.Age = patient.Age; this.Communication = new Communication(); this.Communication.Address = patient.Communication.Address; this.Communication.Zip = patient.Communication.Zip; this.Communication.Country = patient.Communication.Country; this.Communication.Email = patient.Communication.Email; this.Communication.Phone = patient.Communication.Phone; this.Description = new Description(); this.Description.Interest = patient.Description.Interest; this.Description.Charateristics = patient.Description.Charateristics; this.Image = new Image(); this.Image.ImageCodeBase64 = patient.Image.ImageCodeBase64; }