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")); }
public void Count_WhenCalled_ReturnCountOfDistinctVowelsInString(string input, int expected) { var result = TextAnalyser.CountDistinctVowels(input); Assert.That(result, Is.EqualTo(expected)); }
public void Remove_WhenCalled_ReturnStringWithOnlyLetters(string input, string expected) { var result = TextAnalyser.RemoveSpacesAndSpecialCharacters(input); Assert.AreEqual(expected, result); }
public void Find_WhenCalled_ReturnStringWithoutSpacesAndSpecialCharacters(string input, string expected) { var result = TextAnalyser.RemoveSpacesAndSpecialCharacters(input); StringAssert.AreEqualIgnoringCase(expected, result); }