public void Query_All_ReturnAll() { CreateMockHouses(); filter.Take = 999; filter.Skip = 0; var result = HouseProjections.GetHouseList(filter); Assert.IsTrue(result.TotalRecords == 10); }
public IHttpActionResult GetHouses(HouseSearchRequest search) { //throw new NotImplementedException("To do"); // #01 get the result from projection HouseSearchResponse responseObject = HouseProjections.GetHouseList(search); // #02 send back 200 OK with response return(Ok(responseObject)); }
public void Query_SecondFive_ReturnOnlySecondFive() { CreateMockHouses(); filter.Take = 5; filter.Skip = 5; var result = HouseProjections.GetHouseList(filter); Assert.IsTrue(result.Items.Count() == 5); Assert.IsTrue(result.Items.Any(x => x.Code == "6")); Assert.IsFalse(result.Items.Any(x => x.Code == "4")); }