public SearchResultFormViewModel <WrmsSystemDto, WrmsSystemSearchRequest> CreateFormViewModel() { var searchRequest = new WrmsSystemSearchRequest(); //searchRequest.Contacts = _personManagementService.GetActiveStaff(); searchRequest.Contacts = _personManagementService.GetAll(); var viewModel = Search(searchRequest); viewModel.SearchRequest = searchRequest; return(viewModel); }
public void CanGetAllPeople() { // Establish Context IList <Person> peopleToExpect = new List <Person>(); Person person = PersonInstanceFactory.CreateValidTransientPerson(); peopleToExpect.Add(person); _personRepository.Expect(r => r.GetAll("LastName", "Asc")) .Return(peopleToExpect); // Act IList <Person> peopleRetrieved = _personManagementService.GetAll(); // Assert peopleRetrieved.ShouldNotBeNull(); peopleRetrieved.Count.ShouldEqual(1); peopleRetrieved[0].ShouldNotBeNull(); peopleRetrieved[0].ShouldEqual(person); }