Example #1
0
        public ViewResult Index(IndexViewModel model)
        {
            model.Institutions = this.institutionRepository.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);
        }
Example #2
0
        public void ConstructorSetsSortDirectionToDescending()
        {
            // Arrange
            var indexViewModel = new IndexViewModel();

            // Act

            // Assert
            Assert.Equal(SortDirection.Descending, indexViewModel.Sort);
        }
Example #3
0
        public void ConstructorSetsSortByToNumberOfJournalScoreCards()
        {
            // Arrange
            var indexViewModel = new IndexViewModel();

            // Act

            // Assert
            Assert.Equal(InstitutionSortMode.NumberOfBaseJournalScoreCards, indexViewModel.SortBy);
        }
        public ViewResult Index(IndexViewModel model)
        {
            model.Institutions = this.institutionRepository.Search(model.ToFilter());

            return this.View(model);
        }