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

            patientAccount.Block();
            _patientRepository.Update(patientAccount);
        }