public void RemovingNotExistingCommandShouldThrow()
 {
     BasicUIRenderer basicUIRenderer = new ConsoleUIRenderer();
     var command = new ExitCommand(basicUIRenderer, "test");
     var mockedCommandComposer = new Mock<CommandComposer>(basicUIRenderer);
     mockedCommandComposer.Setup(x => x.Execute()).Throws(new Exception());
     mockedCommandComposer.Object.AddCommand(command);
 }
        public void RenderStartGameMessageShouldNotThrow()
        {
            IBasicUIRenderer renderer = new ConsoleUIRenderer();
            var highscore = new Highscore();
            var basicIOProvider = new BasicIOProvider<BasicUIRenderer>(renderer, highscore);

            basicIOProvider.RenderStartGameMessage();
        }
 public void ExecuteCommandShouldNotThrow()
 {
     BasicUIRenderer basicUIRenderer = new ConsoleUIRenderer();
     var command = new ExitCommand(basicUIRenderer, "test");
     var mockedCommandComposer = new Mock<CommandComposer>(basicUIRenderer);
     mockedCommandComposer.Object.AddCommand(command);
     mockedCommandComposer.Object.Execute();
     mockedCommandComposer.Verify(x => x.Execute(), Times.Once());
 }
 public void AddingAndRemovingCommandShouldResultInCountOfAvailableCommandsEqualToZero()
 {
     BasicUIRenderer basicUIRenderer = new ConsoleUIRenderer();
     var command = new ExitCommand(basicUIRenderer, "test");
     var mockedCommandComposer = new Mock<CommandComposer>(basicUIRenderer);
     mockedCommandComposer.Object.AddCommand(command);
     mockedCommandComposer.Setup(x => x.Execute());
     mockedCommandComposer.Object.RemoveExecutedCommand();
     mockedCommandComposer.Setup(x => x.Execute()).Throws(new Exception());
 }
        public void ProceedCommandShouldThrow()
        {
            IBasicUIRenderer renderer = new ConsoleUIRenderer();
            var highscore = new Highscore();
            var basicIOProvider = new BasicIOProvider<BasicUIRenderer>(renderer, highscore);

            var matrix = new Matrix(5, 5);
            var moves = new Mover();
            basicIOProvider.ProceedCommand("ab", matrix, moves);
        }
        public void RenderMatrixTest()
        {
            var testUIrenderer = new Game.UIRenderer.Renderers.ConsoleUIRenderer();
            var matrixTesting = new Game.Models.Matrix.Matrix(5, 5);

            try
            {
                testUIrenderer.RenderMatrix(matrixTesting);
            }
            catch (Exception ex)
            {
                Assert.Fail("Expected no exception, but got: " + ex.Message);
            }
        }
 public void ConsoleShouldPrintHighScores()
 {
     var testUIrenderer = new Game.UIRenderer.Renderers.ConsoleUIRenderer();
     var testingHighScore = new Highscore();
     testUIrenderer.PrintHighscore(testingHighScore);
 }
 public void ConsoleShouldOutputGivenMessage()
 {
     var testConsole = new ConsoleUIRenderer();
     testConsole.RenderOutputMessage("message");
 }