public void LocateClientT() { SearchHelper target = new SearchHelper(); // TODO: Initialize to an appropriate value string s = SerializeToJSON(new List<string> { "Steve","BIll","asdfas"}); Console.Write(s); }
public HttpResponseMessage Search(string query, string searchType) { try {//Need to use DI var searchHelper = new SearchHelper(); var list = searchHelper.LocateClient(query, searchType); var totalPossible = searchHelper.CountClient(query, searchType); var listOfWords = searchHelper.GetWordList(query, searchType); return CreateResponse(list, totalPossible, listOfWords); } catch (Exception ex) { throw new HttpResponseException(HandleExcpetion(ex)); } }
public CountResource() { try { //need DI here searchHelper = new SearchHelper(); } catch (Exception ex) { var response = new HttpResponseMessage(); response.StatusCode = HttpStatusCode.InternalServerError; response.Content = new StringContent(ex.ToString()); throw new HttpResponseException(response); } }
public HttpResponseMessage SearchByPeice(string name, string phone, string address, string policy) { try { //Need to use DI var searchHelper = new SearchHelper(); var list = searchHelper.LocateClient(name, phone, address, policy); var totalPossible = searchHelper.CountClient(name, phone, address, policy); var listOfWords = new List<string>() {"NA"}; //var listOfWords = searchHelper.GetWordList(name); return CreateResponse(list, totalPossible, listOfWords); } catch (Exception ex) { throw new HttpResponseException(HandleExcpetion(ex)); } }
public void LocateClientTest1() { SearchHelper target = new SearchHelper(); // TODO: Initialize to an appropriate value string name = "Steve"; // TODO: Initialize to an appropriate value string phone = "123"; // TODO: Initialize to an appropriate value string address = string.Empty; // TODO: Initialize to an appropriate value string policy = string.Empty; // TODO: Initialize to an appropriate value List<string> expected = null; // TODO: Initialize to an appropriate value List<string> actual; actual = target.LocateClient(name, phone, address, policy); Assert.AreEqual(expected, actual); Assert.Inconclusive("Verify the correctness of this test method."); }