示例#1
0
        private List <string> CleanAndSplitContent()
        {
            var content  = SpecialCharactersRemover.Remove(Content.ToLower());
            var wordList = content.Split(' ').ToList();

            return(ArticleAndPrepositionRemover.Remove(wordList));
        }
示例#2
0
        public void RemoveArticlesAndPrepostionsFromString()
        {
            var words = new List <string> {
                "isso", "é", "um", "texto", "de", "teste"
            };
            var expectedWords = new List <string> {
                "é", "texto", "teste"
            };
            var cleanContent = ArticleAndPrepositionRemover.Remove(words);

            cleanContent.ShouldAllBeEquivalentTo(expectedWords);
        }
示例#3
0
        public void RemoveArticlesAndPrepostionsFromEmptyString()
        {
            var cleanContent = ArticleAndPrepositionRemover.Remove(null);

            cleanContent.ShouldBeEquivalentTo(null);
        }