public void Should_not_bootstrap_competition_if_arena_upper_right_coordinates_are_wrong() { _consoleWrapperMock.Setup(m => m.ReadArenaUpperRightCoords()).Returns("5"); RobotWarsCompetition.serviceContainer = _serviceContainer; RobotWarsCompetition.Main(new[] { "" }); _competitionBootstrapMock.Verify(m => m.Start(It.IsAny <InputCompetitionDataDTO>()), Times.Exactly(0)); }
public void Should_not_bootstrap_competition_if_robot_position_or_heading_are_wrong(string robotPosition, string robotHeading) { _consoleWrapperMock.Setup(m => m.ReadArenaUpperRightCoords()).Returns("5 5"); _consoleWrapperMock.Setup(m => m.ReadRobotLocationAndHeadingDirection()).Returns(string.Format("{0} {1}", robotPosition, robotHeading)); RobotWarsCompetition.serviceContainer = _serviceContainer; RobotWarsCompetition.Main(new[] { "" }); _competitionBootstrapMock.Verify(m => m.Start(It.IsAny <InputCompetitionDataDTO>()), Times.Exactly(0)); }
public void Should_bootstrap_competition() { _consoleWrapperMock.Setup(m => m.ReadArenaUpperRightCoords()).Returns("5 5"); _consoleWrapperMock.Setup(m => m.ReadRobotLocationAndHeadingDirection()).Returns("1 2 N"); _consoleWrapperMock.Setup(m => m.ReadRobotBattleMoves()).Returns("LMLMLMLMM"); RobotWarsCompetition.serviceContainer = _serviceContainer; RobotWarsCompetition.Main(new [] { "" }); _competitionBootstrapMock.Verify(m => m.Start(It.IsAny <InputCompetitionDataDTO>()), Times.Exactly(1)); }