Example #1
0
        public IActionResult GetDeliveryPointByPostalAddress(Guid addressId)
        {
            try
            {
                using (loggingHelper.RMTraceManager.StartTrace("WebService.GetDeliveryPointByPostalAddress"))
                {
                    string methodName = typeof(DeliveryPointController) + "." + nameof(GetDeliveryPointByPostalAddress);
                    loggingHelper.LogMethodEntry(methodName, priority, entryEventId);

                    var deliveryPoint = businessService.GetDeliveryPointByPostalAddress(addressId);

                    loggingHelper.LogMethodExit(methodName, priority, exitEventId);

                    return(Ok(deliveryPoint));
                }
            }
            catch (AggregateException ae)
            {
                foreach (var exception in ae.InnerExceptions)
                {
                    loggingHelper.Log(exception, TraceEventType.Error);
                }

                var realExceptions = ae.Flatten().InnerException;
                throw realExceptions;
            }
        }
Example #2
0
        public void Test_GetDeliveryPointByPostalAddress()
        {
            var result = testCandidate.GetDeliveryPointByPostalAddress(Guid.NewGuid());

            Assert.IsNotNull(result);
        }