public void ShouldThrowWhenInvalidMatrixTypeIsPassed() { var startCommand = new StartCommand(MinesweeperEngine.Instance, this.matrix, this.player, new MatrixDirector(), new MediumMatrixBuilder(), this.printer); ICommandInfo command = new CommandInfo(string.Empty, new List<string>() { "invalid type" }); Assert.Throws(typeof(ArgumentOutOfRangeException), () => startCommand.Execute(command)); }
public void ShouldBeAbleToCreateMatrixOfDifferentTypes(string matrixType) { var startCommand = new StartCommand(MinesweeperEngine.Instance, this.matrix, this.player, new MatrixDirector(), new MediumMatrixBuilder(), this.printer); ICommandInfo commandInfo = new CommandInfo(string.Empty, new List<string>() { matrixType }); Assert.DoesNotThrow(() => startCommand.Execute(commandInfo)); }