public void Scenario4() { //Arrange RobotOperator robotOperator = new RobotOperator( new Robot(1, 3, "N"), _testArena ); //Act var location = robotOperator.ExecuteInstructions("MMLMMLMMMMM"); var penalties = robotOperator.ReportPenalties(); //Assert Assert.AreEqual(location, "0,0,S"); Assert.AreEqual(3, penalties); }
public void Scenario2() { //Arrange RobotOperator robotOperator = new RobotOperator( new Robot(4, 4, "S"), _testArena ); //Act var location = robotOperator.ExecuteInstructions("LMLLMMLMMMRMM"); var penalties = robotOperator.ReportPenalties(); //Assert Assert.AreEqual(location, "0,1,W"); Assert.AreEqual(1, penalties); }
public void Scenario3() { //Arrange RobotOperator robotOperator = new RobotOperator( new Robot(2, 2, "W"), _testArena ); //Act var location = robotOperator.ExecuteInstructions("MLMLMLMRMRMRMRM"); var penalties = robotOperator.ReportPenalties(); //Assert Assert.AreEqual(location, "2,2,N"); Assert.AreEqual(0, penalties); }
public void Initialize() { _robot = new Robot(); _robotOperator = new RobotOperator(_robot); }