public void ReturnsCorrectSearchViewModel()
        {
            //Arrange
            var searchViewModel = new DashboardVacancySummariesSearchViewModel
            {
                FilterType = VacanciesSummaryFilterTypes.All
            };

            //Act
            var vacancySummariesViewModel = _provider.GetPendingQAVacanciesOverview(searchViewModel);

            //Assert
            vacancySummariesViewModel.SearchViewModel.FilterType.Should().Be(VacanciesSummaryFilterTypes.All);
            vacancySummariesViewModel.SearchViewModel.Should().Be(searchViewModel);
        }
コード例 #2
0
        public MediatorResponse <HomeViewModel> GetHomeViewModel(ClaimsPrincipal principal,
                                                                 DashboardVacancySummariesSearchViewModel searchViewModel)
        {
            var username                  = principal.Identity.Name;
            var userViewModel             = _agencyUserProvider.GetAgencyUser(username);
            var vacancySummariesViewModel = _vacancyQaProvider.GetPendingQAVacanciesOverview(searchViewModel);

            var homeViewModel = new HomeViewModel
            {
                AgencyUser       = userViewModel,
                VacancySummaries = vacancySummariesViewModel
            };

            return(GetMediatorResponse(AgencyUserMediatorCodes.GetHomeViewModel.OK, homeViewModel));
        }