public void Test_FetchStreetNamesForAdvanceSearch() { var result = testCandidate.GetStreetNamesForAdvanceSearch("abc", Guid.NewGuid(), "Delivery Office"); Assert.IsNotNull(result); Assert.AreEqual(result.Result[0].LocalName, "abc"); }
public async Task <IActionResult> GetStreetNamesForAdvanceSearch(string searchText) { using (loggingHelper.RMTraceManager.StartTrace("Controller.GetStreetNamesForAdvanceSearch")) { string methodName = typeof(NetworkManagerController) + "." + nameof(GetStreetNamesForAdvanceSearch); loggingHelper.LogMethodEntry(methodName, priority, entryEventId); try { List <StreetNameDTO> streetNames = await networkManagerBusinessService.GetStreetNamesForAdvanceSearch(searchText, this.CurrentUserUnit, this.CurrentUserUnitType); loggingHelper.LogMethodExit(methodName, priority, exitEventId); return(Ok(streetNames)); } catch (AggregateException ae) { foreach (var exception in ae.InnerExceptions) { loggingHelper.Log(exception, TraceEventType.Error); } var realExceptions = ae.Flatten().InnerException; throw realExceptions; } } }