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(); }
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(); }
private void SetupGetEventMembersAsNonAdmin() { _eventsController = new EventsController(GetBaseServiceCollection(false), EventService.Object) { ControllerContext = GetControllerContext(true) }; _eventsController.AddEventToRoute(); _eventsController.TriggerActionExecuting(); }
private void SetupGetVolunteerEventForAnonymousUser() { _eventsController = new EventsController(GetBaseServiceCollection(), EventService.Object) { ControllerContext = GetControllerContext(false) }; _eventsController.AddEventToRoute(); _eventsController.TriggerActionExecuting(); }
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(); }