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(UserProfileSortMode.NumberOfBaseJournalScoreCards, indexViewModel.SortBy); }
public ViewResult Index(IndexViewModel model) { model.Institutions = this.institutionRepository.All.ToSelectListItems("<All institutions>"); model.Profiles = this.UserProfileRepository.Search(model.ToFilter()); return this.View(model); }
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); }