Exemplo n.º 1
0
        public void FieldNotMarkedAsMine_ExecuteMarkAsMineCommand_FieldIsMarkedAsMine()
        {
            this.Minefield = TestMinefieldFactory.CreateMinefield(HiddenMine);
            var command = new MarkAsMineCommand(this.Minefield, this.Middle);

            command.Execute();

            Assert.True(Minefield.GetValue(Middle).BombMarked);  // Field not marked as mine.
            Assert.Equal(1, Minefield.Count(x => x.BombMarked)); // Too many fields marked as mine.
        }