public async Task <IActionResult> GetPostalAddresses([FromBody] List <Guid> addressGuids) { try { using (loggingHelper.RMTraceManager.StartTrace("Controller.GetPostalAddresses")) { string methodName = typeof(PostalAddressController) + "." + nameof(GetPostalAddresses); loggingHelper.LogMethodEntry(methodName, priority, entryEventId); var addressDetails = await businessService.GetPostalAddresses(addressGuids); loggingHelper.LogMethodExit(methodName, priority, exitEventId); return(Ok(addressDetails)); } } catch (AggregateException ex) { foreach (var exception in ex.InnerExceptions) { loggingHelper.Log(exception, TraceEventType.Error); } var realExceptions = ex.Flatten().InnerException; throw realExceptions; } }
public void Test_GetPostalAddresses() { var result = testCandidate.GetPostalAddresses(new List <Guid>() { Guid.NewGuid() }); Assert.IsNotNull(result); }