public void RepeatCounter_VerifyInputWordWithinRepeatCounter_String() { //Arrange RepeatCounter repeatCounter = new RepeatCounter(); //Act repeatCounter.AddWord("walk"); //Assert Assert.AreEqual("walk", repeatCounter.WordInput); }
public void IsAWord_ChecksToSeeIfUserWordIsInEnglishDictionary_true() { //Arrange RepeatCounter repeatCounter = new RepeatCounter(); repeatCounter.AddWord("date"); //Act bool wordResult = RepeatCounter.IsAWord(repeatCounter.WordInput); //Assert Assert.AreEqual(true, wordResult); }
public void WordRepeatCount_TotalsNumberOfTimesUserWordOccursInSentenceArray_integer() { //Arrange RepeatCounter repeatCounter = new RepeatCounter(); repeatCounter.AddWord("walk"); repeatCounter.AddSentence("I took my cat Walker for a walk"); //Act int wordCount = repeatCounter.WordRepeatCount(); //Assert Assert.AreEqual(1, wordCount); }
public void ContainsWord_SearchesForOccuranceUserWordInSentenceArray_True() { //Arrange RepeatCounter repeatCounter = new RepeatCounter(); repeatCounter.AddWord("walk"); repeatCounter.AddSentence("I took my cat Walker for a walk"); //Act bool result = repeatCounter.ContainsWord(); //Assert Assert.AreEqual(true, result); }