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); }
public void ConstructorSetsSortDirectionToDescending() { // Arrange var indexViewModel = new IndexViewModel(); // Act // Assert Assert.Equal(SortDirection.Descending, indexViewModel.Sort); }
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); }