public void NulliShootPosition() { var positionValidator = new PositionValidator(); var player = new Player(); var columnSize = 10; var rowSize = 10; bool result = positionValidator.IsShootOk(null, columnSize, rowSize, player); result.Should().BeFalse(); }
public void OutOfBoundX() { var positionValidator = new PositionValidator(); var player = new Player(); var iShootPosition = new Position(11, 0); var columnSize = 10; var rowSize = 10; bool result = positionValidator.IsShootOk(iShootPosition, columnSize, rowSize, player); result.Should().BeFalse(); }
public void NegativeYPosition() { var positionValidator = new PositionValidator(); var player = new Player(); var iShootPosition = new Position(0, -1); var columnSize = 10; var rowSize = 10; bool result = positionValidator.IsShootOk(iShootPosition, columnSize, rowSize, player); result.Should().BeFalse(); }
public void CorrectlyPosition() { var positionValidator = new PositionValidator(); var player = new Player(); player.Positions = new List <Position>(); player.Hits = new List <Hit>(); var iShootPosition = new Position(1, 2); var columnSize = 10; var rowSize = 10; bool result = positionValidator.IsShootOk(iShootPosition, columnSize, rowSize, player); result.Should().BeTrue(); }