Пример #1
0
        public void ConstructorSetsSortDirectionToDescending()
        {
            // Arrange
            var indexViewModel = new IndexViewModel();

            // Act

            // Assert
            Assert.Equal(SortDirection.Descending, indexViewModel.Sort);
        }
Пример #2
0
        public void ConstructorSetsSortByToNumberOfJournalScoreCards()
        {
            // Arrange
            var indexViewModel = new IndexViewModel();

            // Act

            // Assert
            Assert.Equal(UserProfileSortMode.NumberOfBaseJournalScoreCards, indexViewModel.SortBy);
        }
Пример #3
0
        public ViewResult Index(IndexViewModel model)
        {
            model.Institutions = this.institutionRepository.All.ToSelectListItems("<All institutions>");
            model.Profiles = this.UserProfileRepository.Search(model.ToFilter());

            return this.View(model);
        }
Пример #4
0
        public ViewResult Index(IndexViewModel model)
        {
            model.Institutions = this.institutionRepository.All.ToSelectListItems("<All institutions>");
            model.Profiles = this.UserProfileRepository.Search(model.ToFilter());
            model.NumberOfBaseScoreCards = this.baseScoreCardRepository.Count(new ScoreCardFilter { State = ScoreCardState.Published });
            model.NumberOfValuationScoreCards = this.valuationScoreCardRepository.Count(new ScoreCardFilter { State = ScoreCardState.Published });

            return this.View(model);
        }