public void GetSeoList_with_valid_term_return_seo_codes() { string term = "test"; var seoList = Builder <SocioEconomicObjective> .CreateListOfSize(2) .Build(); _socioEconomicObjectiveRepository.GetMatching(Arg.Is(term)) .Returns(seoList); _controller.WithCallTo(c => c.GetSeoList(term)) .ShouldReturnJson(); }
public void Return_a_list_of_socio_economic_objective_codes_with_call_to_getall() { var forList = _repository.GetMatching("82"); Assert.That(forList, Is.Not.Null); Assert.That(forList.Count, Is.EqualTo(10)); }
/// <summary> /// Gets the seo list. /// </summary> /// <param name="term">The term.</param> /// <returns>List of SEO Codes</returns> public JsonResult GetSeoList(string term) { var codes = _socioEconomicObjectiveRepository.GetMatching(term); return(GenerateJsonList(codes)); }