private void AssertHappinessChangeViewModel(PatientsHappinessChangeViewModel data, HappinessChangeDto dto, Race race, Gender sex, decimal hChange, Mock<IPatientRepository> pRepository, Mock<IDemographicFormDataRepository> dfdRepository, Mock<IHappinessFormDataRepository> hfdRepository) { Assert.That(data.ClinicId, Is.EqualTo(dto.ClinicId)); Assert.That(data.DoctorId, Is.EqualTo(dto.DoctorId)); Assert.That(data.ClinicName, Is.EqualTo(dto.ClinicName)); Assert.That(data.DoctorName, Is.EqualTo(dto.DoctorName)); Assert.That(data.PatientId, Is.EqualTo(dto.PatientId)); Assert.That(data.PatientNumber, Is.EqualTo(dto.PatientNumber)); Assert.That(data.Race, Is.EqualTo(EnumHelper.GetDescription(race))); Assert.That(data.Gender, Is.EqualTo(EnumHelper.GetDescription(sex))); Assert.That(data.HappinessChange, Is.EqualTo(hChange)); pRepository.Verify(r => r.GetHappinessChangeData(), Times.Once()); dfdRepository.Verify(r => r.GetFormDataByFormId(dto.DemographicFormId), Times.Once()); hfdRepository.Verify(r => r.GetFormDataByFormId(dto.HappinessDay1FormId), Times.Once()); hfdRepository.Verify(r => r.GetFormDataByFormId(dto.HappinessDay10FormId), Times.Once()); }
private void AssertHappinessChangeData(HappinessChangeDto data, int clinicId, int doctorId, int patId) { Assert.That(data.ClinicId, Is.EqualTo(clinicId)); Assert.That(data.DoctorId, Is.EqualTo(doctorId)); Assert.That(data.ClinicName, Is.EqualTo(String.Format("Clinic{0}", clinicId))); Assert.That(data.DoctorName, Is.EqualTo(String.Format("First{0} Last{0}", doctorId))); Assert.That(data.PatientId, Is.EqualTo(patId)); Assert.That(data.PatientNumber, Is.EqualTo(10 + patId)); Assert.That(data.DemographicFormId, Is.EqualTo(201 + patId)); Assert.That(data.HappinessDay1FormId, Is.EqualTo(202 + patId)); Assert.That(data.HappinessDay10FormId, Is.EqualTo(203 + patId)); }