public void BlockPatientAccount(PatientAccount patient, bool canBlock) { if (canBlock) { patient.Block(); } else { Assert.Throws <ValidationException>(() => patient.Block()); } }
public void Block(string jmbg) { DateTime earliestMaliciousAction = DateTime.Now.AddMonths(-1); PatientAccount patientAccount = _patientRepository.Get(jmbg, earliestMaliciousAction); patientAccount.Block(); _patientRepository.Update(patientAccount); }