Exemplo n.º 1
0
        public async Task <IActionResult> GetDeliveryPointByPostalAddressWithLocation(Guid addressId)
        {
            try
            {
                using (loggingHelper.RMTraceManager.StartTrace("WebService.GetDeliveryPointByPostalAddressWithLocation"))
                {
                    string methodName = typeof(DeliveryPointController) + "." + nameof(GetDeliveryPointByPostalAddressWithLocation);
                    loggingHelper.LogMethodEntry(methodName, priority, entryEventId);

                    var deliveryPoint = await businessService.GetDeliveryPointByPostalAddressWithLocation(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;
            }
        }
Exemplo n.º 2
0
        public async Task Test_GetDeliveryPointByPostalAddressWithLocation_PositiveScenario()
        {
            DeliveryPointDTO expectedresult = await testCandidate.GetDeliveryPointByPostalAddressWithLocation(addressGuid);

            Assert.IsNotNull(expectedresult);
        }