public void CheckIfAFigureIsAddedCorrectlyToTheBoard() { var board = new Board(); var position = new Position(1, 1); var figure = new KingFigure(); board.AddFigure(figure, position); Assert.AreEqual(figure, board.GetFigureAtPosition(position)); }
public void CheckIfGetFigureAtPositionWorkCorrectly() { var board = new Board(); var figure = new KingFigure(); board.AddFigure(figure, new Position(1, 1)); var realFigure = board.GetFigureAtPosition(new Position(1, 1)); Assert.AreEqual(figure, realFigure); }
public void CheckIfGetFigureAtPositionReturnsTheCorrectFigure() { var board = new Board(); var position = new Position(1, 1); var figure = new KingFigure(); board.AddFigure(figure, position); Assert.AreEqual(figure, board.GetFigureAtPosition(position)); }
public void CheckIfAddFigureWorksCorrectlyWithCorrectFigureAndCorrectPosition() { var board = new Board(); var position = new Position(3, 7); IFigure king = new KingFigure(); board.AddFigure(king, position); Assert.AreSame(king, board.GetFigureAtPosition(position)); }
public void CheckIfAFigureIsAddedCorrectlyToTheBoard() { var position = new Position(1, 1); Mock<IFigure> mockedFigure = new Mock<IFigure>(); mockedFigure.Setup(r => r.DisplaySign).Returns("K"); var board = new Board(); board.AddFigure(mockedFigure.Object, position); Assert.AreSame(mockedFigure.Object, board.GetFigureAtPosition(position)); }
public void CheckIfRemoveFigureRemovesTheFigure() { var board = new Board(); var position = new Position(1, 1); var figureSign = FigureSign.K; var figure = new King(figureSign); board.AddFigure(figure, position); board.RemoveFigure(figure, position); Assert.AreNotEqual(figure, board.GetFigureAtPosition(position)); }
public void CheckIfAddFigureWorksCorrectlyWithCorrectFigureAndCorrectPosition() { var board = new Board(); var position = new Position(Constants.MaximumRowValueOnBoard / 2, Constants.MaximumColumnValueOnBoard / 2); Mock<IFigure> mockedFigure = new Mock<IFigure>(); mockedFigure.Setup(r => r.DisplaySign).Returns("K"); var king = mockedFigure.Object; board.AddFigure(king, position); Assert.AreSame(king, board.GetFigureAtPosition(position)); }
public void CheckIfGetFigureAtPositionWorkCorrectly() { var position = new Position(Constants.MaximumRowValueOnBoard / 2, Constants.MaximumColumnValueOnBoard / 2); Mock<IFigure> mockedFigure = new Mock<IFigure>(); mockedFigure.Setup(r => r.DisplaySign).Returns("K"); var figure = mockedFigure.Object; var board = new Board(); board.AddFigure(figure, position); var realFigure = board.GetFigureAtPosition(position); Assert.AreEqual(figure, realFigure); }
public void CheckIfGetFigureAtPositionReturnsTheCorrectFigure() { var position = new Position(1, 1); Mock<IFigure> mockedFigure = new Mock<IFigure>(); mockedFigure.Setup(r => r.DisplaySign).Returns("K"); var figure = mockedFigure.Object; var board = new Board(); board.AddFigure(figure, position); Assert.AreSame(figure, board.GetFigureAtPosition(position)); }