public void ExpectGetCommandToReturnTopCommandWhenValidString() { var commandManager = new CommandManager(); var result = commandManager.GetCommand("Top"); Assert.IsInstanceOfType(result, typeof(ShowScoresCommand)); }
public void ExpectGetCommandToReturnRestartCommandWhenValidString() { var commandManager = new CommandManager(); var result = commandManager.GetCommand("Restart"); Assert.IsInstanceOfType(result, typeof(RestartCommand)); }
public void ExpectGetCommandToReturnIncorrectCommandWhenInvalidString() { var commandManager = new CommandManager(); var result = commandManager.GetCommand("Invalid"); Assert.IsInstanceOfType(result, typeof(IncorrectCommand)); }
/// <summary> /// The main method of the Console UI of the game. /// </summary> public static void Main() { var printer = new Printer(); var reader = new Reader(); var gameInitializator = new GameInitializer.GameInitializer(printer, reader); var game = gameInitializator.Initialize(); var scoreboard = new Scoreboard(); var commandManager = new CommandManager(); var boardHistory = new BoardHistory(); EngineTemplate engine = new Engine.Engine(game, scoreboard, printer, reader, commandManager, boardHistory); engine.Run(); }
public void ExpectInitializingToNotThrow() { var commandManager = new CommandManager(); }
public void ExpectGetCommandToThrowIfSomehowPassedInvalidString() { var commandManager = new CommandManager(); var result = commandManager.GetCommand("42"); }