public IActionResult GetSimpleListsReferenceData(string listName)
        {
            using (loggingHelper.RMTraceManager.StartTrace("WebService.GetSimpleListsReferenceData"))
            {
                string methodName = MethodBase.GetCurrentMethod().Name;
                loggingHelper.Log(methodName + LoggerTraceConstants.COLON + LoggerTraceConstants.MethodExecutionStarted, TraceEventType.Verbose, null, LoggerTraceConstants.Category, LoggerTraceConstants.ReferenceDataAPIPriority, LoggerTraceConstants.ReferenceDataControllerMethodEntryEventId, LoggerTraceConstants.Title);

                if (string.IsNullOrEmpty(listName))
                {
                    return(BadRequest());
                }

                var simpleListObject = referenceDataBusinessService.GetSimpleListsReferenceData(listName);

                Tuple <string, SimpleListDTO> nameValueSingleResource = new Tuple <string, SimpleListDTO>(SimpleList, simpleListObject);

                if (simpleListObject == null)
                {
                    throw new BusinessLogicException(ErrorConstants.Err_MisMatchConfigFile, HttpStatusCode.ExpectationFailed);
                }

                loggingHelper.Log(methodName + LoggerTraceConstants.COLON + LoggerTraceConstants.MethodExecutionCompleted, TraceEventType.Verbose, null, LoggerTraceConstants.Category, LoggerTraceConstants.ReferenceDataAPIPriority, LoggerTraceConstants.ReferenceDataControllerMethodExitEventId, LoggerTraceConstants.Title);
                return(Ok(nameValueSingleResource));
            }
        }
Beispiel #2
0
        public void Test_GetSimpleListsReferenceData()
        {
            var result = testCandidate.GetSimpleListsReferenceData("AccessLinkStatus");

            Assert.IsNotNull(result);
        }