public SentimentalNewsProvider(string webhoseToken, string indicoUrl, string indicoToken)
 {
     this.webHoseToken = webhoseToken.CheckNotNullOrWhitespace("token");
     this.newsClient = new WebhoseClient(webHoseToken);
     this.nlpClient = new TextAnalyser(indicoUrl.CheckNotNullOrWhitespace("indicoUrl"), 
         indicoToken.CheckNotNullOrWhitespace("indicoToken"));
 }
Пример #2
0
        public void Count_WhenCalled_ReturnCountOfDistinctVowelsInString(string input, int expected)
        {
            var result = TextAnalyser.CountDistinctVowels(input);

            Assert.That(result, Is.EqualTo(expected));
        }
Пример #3
0
        public void Remove_WhenCalled_ReturnStringWithOnlyLetters(string input, string expected)
        {
            var result = TextAnalyser.RemoveSpacesAndSpecialCharacters(input);

            Assert.AreEqual(expected, result);
        }
Пример #4
0
        public void Find_WhenCalled_ReturnStringWithoutSpacesAndSpecialCharacters(string input, string expected)
        {
            var result = TextAnalyser.RemoveSpacesAndSpecialCharacters(input);

            StringAssert.AreEqualIgnoringCase(expected, result);
        }