public void RepeatCounter_FormatAndVerifyInputStringWithinRepeatCounter_String() { //Arrange RepeatCounter repeatCounter = new RepeatCounter(); //Act repeatCounter.AddSentence("I took the cat for a walk"); //Assert Assert.AreEqual(" I took the cat for a walk ", repeatCounter.SentenceInput); }
public void SentenceToArray_IntakesUserSentenceAndReturnsArrayOfWords_WordString() { //Arrange RepeatCounter repeatCounter = new RepeatCounter(); repeatCounter.AddSentence("I took the cat for a walk"); //Act string[] sentenceArray = RepeatCounter.SentenceToArray(repeatCounter.SentenceInput); //Assert Assert.AreEqual("walk", sentenceArray[7]); }
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); }