Esempio n. 1
0
        public void PlayingGame_ForMultiplesOfBothThreeAndFive_ReturnsFizzBuzz(int index, string expected)
        {
            // Arrange
            var printerMock = new ResultPrinterMock();
            var game        = new FizzBuzzGame(printerMock);

            // Act
            game.PlayTheGame();

            // Assert
            var actual = printerMock.GetMessageWithIndex(index);

            Assert.AreEqual(expected, actual);
        }
Esempio n. 2
0
        public void PlayingGame_AsTheFirstString_Returns1()
        {
            // Arrange
            var printerMock = new ResultPrinterMock();
            var game        = new FizzBuzzGame(printerMock);

            // Act
            game.PlayTheGame();

            // Assert
            var firstResult = printerMock.GetMessageWithIndex(1);

            Assert.AreEqual("1", firstResult);
        }