示例#1
0
        public IActionResult GetDeliveryPoint(Guid deliveryPointGuid, [FromQuery] string fields)
        {
            using (loggingHelper.RMTraceManager.StartTrace("WebService.GetDeliveryPoint"))
            {
                string methodName = typeof(DeliveryPointController) + "." + nameof(GetDeliveryPoint);
                loggingHelper.LogMethodEntry(methodName, priority, entryEventId);

                var deliveryPoint = businessService.GetDeliveryPoint(deliveryPointGuid);
                loggingHelper.Log(methodName + LoggerTraceConstants.COLON + LoggerTraceConstants.MethodExecutionCompleted, TraceEventType.Verbose, null, LoggerTraceConstants.Category, LoggerTraceConstants.DeliveryPointAPIPriority, LoggerTraceConstants.DeliveryPointControllerMethodExitEventId, LoggerTraceConstants.Title);

                if (deliveryPoint == null)
                {
                    return(NotFound());
                }

                CreateSummaryObject <DeliveryPointDTO> createSummary = new CreateSummaryObject <DeliveryPointDTO>();

                if (!string.IsNullOrEmpty(fields))
                {
                    deliveryPoint = (DeliveryPointDTO)createSummary.SummariseProperties(deliveryPoint, fields);
                }

                loggingHelper.LogMethodExit(methodName, priority, exitEventId);

                return(Ok(deliveryPoint));
            }
        }
示例#2
0
        public void Test_GetDeliveryPoint()
        {
            var result = testCandidate.GetDeliveryPoint(Guid.NewGuid());

            Assert.IsNotNull(result);
        }