Example #1
0
        public void Ctor_WithNextStoneAlreadyPresentOnPlayingField_ThrowsArgumentException()
        {
            var playfield = new PlayingBoard();

            playfield = playfield.SetStone(0, 0, this._sampleStone);

            Action call = () => Substitute.For <GameStateBase>(playfield, this._sampleStone, Player.One);

            call.ShouldThrow <TargetInvocationException>().WithInnerException <ArgumentException>();
        }
Example #2
0
        public void Ctor_WithANonNullPlayfieldAndANotSetNextStone_DoesNotThrowAnException()
        {
            var notSetStone = new Stone(Size.High, Surface.Flat, Color.Black, Shape.Square);

            var playfield = new PlayingBoard();

            playfield = playfield.SetStone(0, 0, this._sampleStone);
            Action call = () => Substitute.For <GameStateBase>(playfield, notSetStone, Player.One);

            call.ShouldNotThrow();
        }