Ejemplo n.º 1
0
        public void RemoveChip_removes_chip_from_coordinate()
        {
            // Arrange.
            const int row = 1;
            const int column = 1;
            var sut = new GameBoard();
            sut.PutChip(row, column, Team.A);

            // Assume.
            Assume.That(sut.IsFree(row, column), Is.False);

            // Act.
            sut.RemoveChip(row, column);

            // Assert.
            Assert.That(sut.IsFree(row, column), Is.True);
        }
Ejemplo n.º 2
0
        public void RemoveChip_throws_InvalidOperationException_when_coordinate_is_shared()
        {
            // Arrange.
            const int row = 0;
            const int column = 0;
            var sut = new GameBoard();

            // Act.
            TestDelegate test = () => sut.RemoveChip(row, column);

            // Assert.
            Assert.That(GameBoard.IsShared(row, column), Is.True);
            Assert.That(test, Throws.InvalidOperationException);
        }