public void GivenLogicManagerGeneratesViewModel_WhenSelector_ThenViewModelInResult() { SchoolSelectorModel expected = new SchoolSelectorModel(); MockLogicManager.Expect(m => m.GenerateSchoolSelectorViewModel()).Return(expected); PartialViewResult result = Target.Selector(); result.AssertGetViewModel(expected); }
public SchoolSelectorModel GenerateSchoolSelectorViewModel() { var viewModel = new SchoolSelectorModel(); viewModel.Schools = new MultiSelectList(SchoolRepository.Items, "Id", "Name"); return viewModel; }