public void NumberOfTimes_ChecksWhetherCountedWordCorrect_GrandTotalEqualsZero() { // Arrange string Word = "cat"; string Sentence = "My cats live in Petcat village with other cats that look more like a dog"; // Act RepeatCounters MyRepeatCounter = new RepeatCounters(); MyRepeatCounter.NumberOfTimes(Word, Sentence); // Assert Assert.AreEqual(0, MyRepeatCounter.GrandTotal); }
public void NumberOfTimes_ChecksWhetherCountedWordCorrect_GrandTotalIsUpdated() { // Arrange string Word = "cat"; string Sentence = "My Cat lives in Petcat village with other cats that look like Cat"; // Act RepeatCounters MyRepeatCounter = new RepeatCounters(); MyRepeatCounter.NumberOfTimes(Word, Sentence); // Assert Assert.AreEqual(2, MyRepeatCounter.GrandTotal); }