コード例 #1
0
        public async Task Test_GetStreetNamesForBasicSearch()
        {
            var actualResult = await testCandidate.GetStreetNamesForBasicSearch("Test", unit1Guid, currentUserUnitType);

            Assert.IsNotNull(actualResult);
            Assert.IsTrue(actualResult.Count == 5);
        }
コード例 #2
0
        /// <summary>
        /// Fetch the street name for Basic Search.
        /// </summary>
        /// <param name="searchText">Text to search</param>
        /// <param name="userUnit">Guid</param>
        /// <param name="currentUserUnitType">The current user unit type.</param>
        /// <returns>Task</returns>
        public async Task <List <StreetNameDTO> > GetStreetNamesForBasicSearch(string searchText, Guid userUnit, string currentUserUnitType)
        {
            using (loggingHelper.RMTraceManager.StartTrace("Business.GetStreetNamesForBasicSearch"))
            {
                string methodName = typeof(NetworkManagerBusinessService) + "." + nameof(GetStreetNamesForBasicSearch);
                loggingHelper.LogMethodEntry(methodName, priority, entryEventId);

                var fetchStreetNamesForBasicSearch = await streetNetworkDataService.GetStreetNamesForBasicSearch(searchText, userUnit, currentUserUnitType).ConfigureAwait(false);

                var streetNameDTO = GenericMapper.MapList <StreetNameDataDTO, StreetNameDTO>(fetchStreetNamesForBasicSearch);

                loggingHelper.LogMethodExit(methodName, priority, exitEventId);

                return(streetNameDTO);
            }
        }