Example #1
0
        public void CatTrainer_WithCat_Meows()
        {
            // Arrange
            var cat        = new Cat();
            var catTrainer = new CatTrainer(cat);

            // Act
            var whatDoesACatSay = catTrainer.MakePetSpeak();

            // Assert
            Assert.IsTrue(whatDoesACatSay == "WEOW, MEOW");
        }
Example #2
0
        public void CatTrainer_WithCat_Meows()
        {
            // Arrange
            _cat.Setup(x => x.Speak()).Returns("I feel pretty, Oh, so pretty,I feel pretty and witty and bright!");
            var catTrainer = new CatTrainer(_cat.Object);

            // Act
            var whatDoesACatSay = catTrainer.MakePetSpeak();

            // Assert
            Assert.IsTrue(whatDoesACatSay == "I feel pretty, Oh, so pretty,I feel pretty and witty and bright!");
        }