コード例 #1
0
 private void SetupPostRemoveMember()
 {
     EventService.Setup(x => x.GetEventMemberById(It.IsAny<long>())).Returns(new EventMember());
     EventService.Setup(x => x.SaveEventMember(It.IsAny<EventMember>())).Returns(new EventMember());
     _eventsController = new EventsController(GetBaseServiceCollection(), EventService.Object) { ControllerContext = GetControllerContext(true) };
     _eventsController.AddEventToRoute();
     _eventsController.TriggerActionExecuting();
 }
コード例 #2
0
 private void SetupGetVolunteerEventForAuthenticatedUser()
 {
     EventService.Setup(x => x.SaveCoordinator(It.IsAny<EventCoordinator>())).Returns(new EventCoordinator());
     _eventsController = new EventsController(GetBaseServiceCollection(), EventService.Object) { ControllerContext = GetControllerContext(true) };
     _eventsController.TriggerActionExecuting();
 }
コード例 #3
0
 private void SetupGetEventMembersAsNonAdmin()
 {
     _eventsController = new EventsController(GetBaseServiceCollection(false), EventService.Object) { ControllerContext = GetControllerContext(true) };
     _eventsController.AddEventToRoute();
     _eventsController.TriggerActionExecuting();
 }
コード例 #4
0
 private void SetupGetVolunteerEventForAnonymousUser()
 {
     _eventsController = new EventsController(GetBaseServiceCollection(), EventService.Object) { ControllerContext = GetControllerContext(false) };
     _eventsController.AddEventToRoute();
     _eventsController.TriggerActionExecuting();
 }
コード例 #5
0
 private void SetupGetCancelVolunteerRequest()
 {
     EventService.Setup(x => x.SaveCoordinator(It.IsAny<EventCoordinator>())).Returns(new EventCoordinator());
     _eventsController = new EventsController(GetBaseServiceCollection(), EventService.Object) { ControllerContext = GetControllerContext(true) };
     _eventsController.AddEventToRoute();
     _eventsController.TriggerActionExecuting();
 }