コード例 #1
0
 private void SetupPostInviteMembers()
 {
     EventService.Setup(x => x.SaveEventMember(It.IsAny<EventMember>())).Returns(new EventMember());
     _eventsController = new EventsController(GetBaseServiceCollection(), EventService.Object);
     _eventsController.AddEventToRoute();
 }
コード例 #2
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();
 }
コード例 #3
0
 private void SetupGetVolunteerEventForAnonymousUser()
 {
     _eventsController = new EventsController(GetBaseServiceCollection(), EventService.Object) { ControllerContext = GetControllerContext(false) };
     _eventsController.AddEventToRoute();
     _eventsController.TriggerActionExecuting();
 }
コード例 #4
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();
 }
コード例 #5
0
 private void SetupGetViewEvent()
 {
     _eventsController = new EventsController(null, EventService.Object) { ControllerContext = GetControllerContext(false) };
     _eventsController.AddEventToRoute();
 }
コード例 #6
0
 private void SetupGetInviteMembers()
 {
     _eventsController = new EventsController(GetBaseServiceCollection(), EventService.Object) { ControllerContext = GetControllerContext(true) };
     _eventsController.AddEventToRoute();
 }
コード例 #7
0
 private void SetupGetEventMembersAsNonAdmin()
 {
     _eventsController = new EventsController(GetBaseServiceCollection(false), EventService.Object) { ControllerContext = GetControllerContext(true) };
     _eventsController.AddEventToRoute();
     _eventsController.TriggerActionExecuting();
 }
コード例 #8
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();
 }
コード例 #9
0
 public void SetupGetIndex()
 {
     var service = new Mock<IEventService>();
     service.Setup(x => x.FindEvents(It.IsAny<EventsSearchCriteria>())).Returns(new List<Event>());
     _eventsController = new EventsController(null, service.Object);
 }