public void PresentationManagerShouldBeAbleToPromptForRestart() { PresentationManager target = new PresentationManager(); bool actual = target.PlayAgain(); bool expected = false; Assert.AreEqual(expected, actual); }
public void ShouldBeAbleToAskForFirstOrSecond() { PresentationManager target = new PresentationManager(); bool actual = target.HumanGoesFirst(); bool expected = true; Assert.AreEqual(expected, actual); }
public void PresentationManagerShouldBeAbleToAskForCoordinates() { PresentationManager target = new PresentationManager(); Tuple<int, int> actual = target.PromptCoordinates(); Tuple<int, int> expected = new Tuple<int, int>(0, 0); Assert.AreEqual(expected, actual); }
public void PresentationManagerShouldBeAbleToAskAboutGameSettings() { PresentationManager target = new PresentationManager(); string actual = target.WelcomeAndAskForGameParams(); string expected = "computers"; Assert.AreEqual(expected, actual); }
public void OutputTest() { PresentationManager target = new PresentationManager(new TestIO()); target.IO.Output("testString"); TestIO io = (TestIO)target.IO; string actual = io.lastOutString; string expected = "testString"; Assert.AreEqual(expected, actual); }
public void InputTest() { PresentationManager target = new PresentationManager(new TestIO()); target.IO.Input(); TestIO io = (TestIO)target.IO; io.desiredInString = "Hello World"; string actual = io.Input(); string expected = "Hello World"; Assert.AreEqual(expected, actual); }
public void PresentationManagerShouldBeAbleToPrintTheBoard() { PresentationManager target = new PresentationManager(); HumanPlayer playerOne = new HumanPlayer('X'); HumanPlayer playerTwo = new HumanPlayer('O'); Game game = new Game(playerOne, playerTwo, new BoardManager()); target.PrintBoard(game.board.boardArray); game.board.LogMove(new Tuple<int, int>(1, 1)); target.PrintBoard(game.board.boardArray); game.board.LogMove(new Tuple<int, int>(0, 0)); target.PrintBoard(game.board.boardArray); game.board.LogMove(new Tuple<int, int>(2, 1)); target.PrintBoard(game.board.boardArray); game.board.LogMove(new Tuple<int, int>(1, 2)); target.PrintBoard(game.board.boardArray); }
public GameManager(PresentationManager pm) { presenter = pm; }
public GameManager() { presenter = new PresentationManager(); }