コード例 #1
0
        public void ValidateMineField_ValidStatement_ShouldExecuteCorrectly()
        {
            // Arrange
            var mineField = new MineField {
                TilesX = 2, TilesY = 2
            };

            // Act
            Action action = () => _instance.ValidateMineField(mineField);

            // Assert
            action.ShouldNotThrow();
        }
コード例 #2
0
        public IMineFieldExtended InitMineField()
        {
            var mineField = _mineFieldRepository.GetMineField();
            var exit      = _tileRepository.GetExit();
            var mines     = _tileRepository.GetMines();

            _validator.ValidateMineField(mineField);
            _validator.ValidateExit(mineField, exit);
            _validator.ValidateMines(mineField, mines);

            return(new MineFieldExtended(mineField, exit, mines));
        }