Exemplo n.º 1
0
 private void GivenNoPendingSupervisorDelegateRecordsForEmail()
 {
     A.CallTo(
         () => supervisorDelegateService.GetPendingSupervisorDelegateRecordsByEmailAndCentre(
             A <int> ._,
             A <string> ._
             )
         )
     .Returns(new List <SupervisorDelegate>());
 }
Exemplo n.º 2
0
        private void SetUpSupervisorDelegateRelations(string emailAddress, int centreId, int delegateId)
        {
            var pendingSupervisorDelegateIds =
                supervisorDelegateService.GetPendingSupervisorDelegateRecordsByEmailAndCentre(
                    centreId,
                    emailAddress
                    ).Select(supervisor => supervisor.ID).ToList();

            if (!pendingSupervisorDelegateIds.Any())
            {
                return;
            }

            supervisorDelegateService.AddDelegateIdToSupervisorDelegateRecords(
                pendingSupervisorDelegateIds,
                delegateId
                );
        }