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));
        }
Ejemplo n.º 2
0
        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));
            }
        }