Exemplo n.º 1
0
        public void ContainsDRuleOnlySperatesUppercaseD()
        {
            //Arrange
            var mockLogger    = getMockLogger();
            var containsDRule = new ContainsDRule(mockLogger.Object);

            //Act
            var characters = containsDRule.ApplyRule(testInputContents);
            var villainsContainsOldGuy2 = characters.Villains.Contains("Old Guy 2");

            //Assert
            Assert.IsFalse(villainsContainsOldGuy2);
        }
Exemplo n.º 2
0
        public void ContainsDRuleSperatesCharactersCorrectly()
        {
            //Arrange
            var mockLogger    = getMockLogger();
            var containsDRule = new ContainsDRule(mockLogger.Object);

            //Act
            var characters       = containsDRule.ApplyRule(testInputContents);
            var villainsCount    = characters.Villains.Count;
            var superHeroesCount = characters.Superheroes.Count;

            //Assert
            Assert.AreEqual(2, villainsCount);
            Assert.AreEqual(3, superHeroesCount);
        }