示例#1
0
        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);
        }
示例#2
0
        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);
        }