Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- [Subject(typeof (ListingController))]
- public class When_loading_page_n_of_potential_listings : SpecFor<ListingController>
- {
- static PaginatedQuery<ListingSearchCriteria> query;
- static PaginatedQueryResult<ListingSearchModel> queryResult;
- static JsonResult result;
- Establish context = () =>
- {
- query = new PaginatedQuery<ListingSearchCriteria>();
- queryResult= new PaginatedQueryResult<ListingSearchModel>();
- the_dependency<IListingRepository>().Stub(repo => repo.GetPotentialListings(query)).Return(queryResult);
- };
- Because of = () =>
- {
- result = sut.PotentialListings(query);
- };
- It should_return_the_queryResult_as_JSON_response = () =>
- {
- result.Data.ShouldBeTheSameAs(queryResult);
- };
- }
Add Comment
Please, Sign In to add comment