public void Test_GetOSRoadLink() { var result = testCandidate.GetOSRoadLink("123"); Assert.IsNotNull(result); Assert.AreEqual(result.Result, "abc"); }
public async Task <IActionResult> GetOSRoadLink(string toid) { using (loggingHelper.RMTraceManager.StartTrace("Controller.GetOSRoadLink")) { string methodName = typeof(NetworkManagerController) + "." + nameof(GetOSRoadLink); loggingHelper.LogMethodEntry(methodName, priority, entryEventId); try { string result; result = await networkManagerBusinessService.GetOSRoadLink(toid); loggingHelper.LogMethodExit(methodName, priority, exitEventId); return(Ok(result)); } catch (AggregateException ae) { foreach (var exception in ae.InnerExceptions) { loggingHelper.Log(exception, TraceEventType.Error); } var realExceptions = ae.Flatten().InnerException; throw realExceptions; } } }