コード例 #1
0
        public void RepeatCounterClass_RetrievesList_List()
        {
            // Arrange
            RepeatCounter.AddMatchesToList("cat", "i'm walking the cat to the cathedral'");

            // Act
            List <string> matchingWords   = RepeatCounter.MatchingWords;
            int           numberOfMatches = matchingWords.Count;

            // Assert
            Assert.AreEqual(1, numberOfMatches);
        }
コード例 #2
0
        public void RepeatCounterClass_RetrieveEmptyList_EmptyList()
        {
            // Arrange
            RepeatCounter.AddMatchesToList("cat", "i walked it");

            // Act
            List <string> matchingWords   = RepeatCounter.MatchingWords;
            int           numberOfMatches = matchingWords.Count;

            // Assert
            Assert.AreEqual(0, numberOfMatches);
        }