示例#1
0
 private void OnSavePatientData()
 {
     if (IsEditMode)
     {
         _patientService.UpdatePatient(PatientModel);
         RaiseSaveNotification(Labels.SavedPatientData);
     }
     else
     {
         _patientService.AddNewPatient(PatientModel);
         RaiseSaveNotification(Labels.SavedNewPatientData);
         _regionManager.RequestNavigate(RegionNames.PATIENTMODULECONTENT, typeof(PatientsListView).Name);
     }
 }
示例#2
0
        public void Add_new_patient()
        {
            // Arrange
            _patientDalMock.Stub(x => x.SaveOrUpdatePatient(Arg <PatientEntity> .Is.Anything)).Repeat.Once();

            Patient patient = new Patient
            {
                FirstName = "Dave",
                LastName  = "Grohl"
            };

            // Act
            _patientService.AddNewPatient(patient);

            // Assert
            _patientDalMock.VerifyAllExpectations();
        }