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); }
public void containsWord_doesSentenceHaveWord_true() { //arrange string sentence = "this is a sentence"; string word = "sentence"; bool expectedResult = true; RepeatCounter newCounter = new RepeatCounter(sentence, word); //act bool result = newCounter.ContainsWord(); //assert Assert.Equal(expectedResult, result); }