public ActionResult GetSearchSymbol(string searchKey) { SearchSymbolBusiness searchSymbolBusiness = new SearchSymbolBusiness(); List <string> res = searchSymbolBusiness.GetSearchSymbol(searchKey); var jsonObject = new { len = res.Count, data = res }; return(Json(jsonObject)); }
public void TestGetSearchSymbol() { string key = "a"; SearchSymbolBusiness s = new SearchSymbolBusiness(); try { List <string> slist = s.GetSearchSymbol(key); Assert.IsTrue(slist.Count > 0); } catch (Exception ex) { //Assert.IsInstanceOfType(ex, typeof(DemoException)); } }