Beispiel #1
0
        public void ThrowExceptionOnWrongScore()
        {
            _player1.Setup(x => x.Score).Returns(-1);
            _player2.Setup(x => x.Score).Returns(-1);

            var sut = new TennisGame(_player1.Object, _player2.Object);

            Assert.Throws <IndexOutOfRangeException>(() => sut.Play());
        }