Beispiel #1
0
        private SubscriberController ArrangeSubscriberController(UserProfile profile)
        {
            Mapper.CreateMap <JournalViewModel, Journal>();
            Mapper.CreateMap <Journal, JournalViewModel>();

            var repository = JournalMocks.MockJournalRepositoryWithContext();
            var service    = JournalMocks.MockSubscriptionServiceWithContext();
            IStaticMembershipService memServiceMock  = JournalMocks.MockIStaticMembershipService(profile).MockObject;
            ISessionProvider         sessionProvider = JournalMocks.MockISessionProvider(profile).MockObject;
            SubscriberController     controller      = new SubscriberController(repository, service, memServiceMock);

            controller.CheckRequestAuthenticatd = false;
            controller.SetSessionProvider(sessionProvider);
            return(controller);
        }