protected override void Given() { Dependency<IPageRepository>() .Stub(x => x.Query("query")) .Return(pageResources); resource = new SearchResultsResource {Query = "query"}; }
protected override void When() { result = Subject<SearchHandler>().Get(resource); }
public SearchResultsResource Get(SearchResultsResource resource) { resource.PageResources = pageRepository.Query(resource.Query); return resource; }