Esempio n. 1
0
        public async Task ReturnEmptyListWhenGivenEmptyString()
        {
            // Arrange
            var input = string.Empty;

            // Act
            var result = await keywordsService.CollectKeywords(input);

            // Assert
            Assert.Empty(result);
        }
Esempio n. 2
0
        private async Task <IEnumerable <Keyword> > ProcessProperty(string property, string value)
        {
            var translation = await translateService.Translate(value);

            var collectedKeywords = await keywordsService.CollectKeywords(translation);

            if (!collectedKeywords.Any())
            {
                collectedKeywords = GetDefaultKeywords(translation);
            }

            return(keywordsService.ProcessKeywords(collectedKeywords, property, translation));
        }