public void Setup()
        {
            centreRegistrationPromptsService = A.Fake <ICentreRegistrationPromptsService>();
            delegateDownloadFileService      = A.Fake <IDelegateDownloadFileService>();
            promptsHelper                   = new PromptsService(centreRegistrationPromptsService);
            userDataService                 = A.Fake <IUserDataService>();
            jobGroupsDataService            = A.Fake <IJobGroupsDataService>();
            searchSortFilterPaginateService = A.Fake <ISearchSortFilterPaginateService>();

            httpRequest  = A.Fake <HttpRequest>();
            httpResponse = A.Fake <HttpResponse>();

            const string cookieValue = "ActiveStatus|Active|false";

            allDelegatesController = new AllDelegatesController(
                delegateDownloadFileService,
                userDataService,
                promptsHelper,
                jobGroupsDataService,
                searchSortFilterPaginateService
                )
                                     .WithMockHttpContext(httpRequest, CookieName, cookieValue, httpResponse)
                                     .WithMockUser(true)
                                     .WithMockServices()
                                     .WithMockTempData();
        }
Beispiel #2
0
        public void Setup()
        {
            var centreCustomPromptsService = A.Fake <ICentreCustomPromptsService>();

            centreCustomPromptsHelper = new CentreCustomPromptHelper(centreCustomPromptsService);
            userDataService           = A.Fake <IUserDataService>();
            jobGroupsDataService      = A.Fake <IJobGroupsDataService>();

            httpRequest  = A.Fake <HttpRequest>();
            httpResponse = A.Fake <HttpResponse>();
            const string cookieName  = "DelegateFilter";
            const string cookieValue = "ActiveStatus|Active|false";

            allDelegatesController = new AllDelegatesController(
                userDataService,
                centreCustomPromptsHelper,
                jobGroupsDataService
                )
                                     .WithMockHttpContext(httpRequest, cookieName, cookieValue, httpResponse)
                                     .WithMockUser(true)
                                     .WithMockServices()
                                     .WithMockTempData();
        }