public async Task Test_GetPostcodeID()
        {
            var actualResult = await testCandidate.GetPostcodeID("123");

            Assert.IsNotNull(actualResult);
            Assert.AreEqual(actualResult.ID, new Guid("3534aa41-391f-4579-a18d-d7edf5b5f918"));
        }
Esempio n. 2
0
        /// <summary>
        /// Get post code ID by passing post code.
        /// </summary>
        /// <param name="postCode"> Post Code</param>
        /// <returns>Post code ID</returns>
        public async Task <Guid> GetPostcodeID(string postCode)
        {
            string methodName = typeof(UnitLocationBusinessService) + "." + nameof(GetPostcodeID);

            using (loggingHelper.RMTraceManager.StartTrace("Business.GetPostcodeID"))
            {
                loggingHelper.LogMethodEntry(methodName, LoggerTraceConstants.UnitManagerAPIPriority, LoggerTraceConstants.UnitManagerBusinessServiceMethodEntryEventId);

                var postCodeData = await postCodeDataService.GetPostcodeID(postCode);

                var postCodeID = postCodeData != null ? postCodeData.ID : Guid.Empty;
                loggingHelper.LogMethodExit(methodName, LoggerTraceConstants.UnitManagerAPIPriority, LoggerTraceConstants.UnitManagerBusinessServiceMethodExitEventId);
                return(postCodeID);
            }
        }