public async Task <IActionResult> GetDeliveryPointByUDPRNforBatch(int udprn) { try { using (loggingHelper.RMTraceManager.StartTrace("WebService.GetDeliveryPointByUDPRNforBatch")) { string methodName = typeof(DeliveryPointController) + "." + nameof(GetDeliveryPointByUDPRNforBatch); loggingHelper.LogMethodEntry(methodName, priority, entryEventId); DeliveryPointDTO deliveryPointDTO = await businessService.GetDeliveryPointByUDPRNforBatch(udprn); loggingHelper.LogMethodExit(methodName, priority, exitEventId); return(Ok(deliveryPointDTO)); } } catch (AggregateException ae) { foreach (var exception in ae.InnerExceptions) { loggingHelper.Log(exception, TraceEventType.Error); } var realExceptions = ae.Flatten().InnerException; throw realExceptions; } }
public void Test_GetDeliveryPointByUDPRNforBatch_PositiveScenario() { var result = testCandidate.GetDeliveryPointByUDPRNforBatch(12345); Assert.IsNotNull(result); }