public void TestLeft_5() { IActionable robot = new TableRobot(new FiveByFiveTableActionValidator()); robot.Place(0, 0, Facing.SOUTH); robot.Left(); var newState = robot.ToString(); Assert.AreEqual("X: 0, Y: 0, Facing: EAST", newState, "Left action sucessful - from south to east"); }
public void TestLeft_4() { IActionable robot = new TableRobot(new FiveByFiveTableActionValidator()); robot.Place(0, 0, Facing.WEST); robot.Left(); var newState = robot.ToString(); Assert.AreEqual("X: 0, Y: 0, Facing: SOUTH", newState, "Left action sucessful - from west to south"); }
public void TestLeft_1() { IActionable robot = new TableRobot(new FiveByFiveTableActionValidator()); var originalState = robot.ToString(); robot.Left(); var newState = robot.ToString(); Assert.AreEqual(originalState, newState, "Left action failed - No left rotate before robot gets placed onto the table"); }
public void TestLeft_5() { var mock = new Mock <IActionValidator>(); mock.Setup(m => m.Validate(It.IsAny <int>(), It.IsAny <int>())).Returns(true); IActionable robot = new TableRobot(mock.Object); robot.Place(0, 0, Facing.EAST); robot.Left(); var newState = robot.ToString(); Assert.AreEqual("X: 0, Y: 0, Facing: NORTH", newState, "Left action sucessful - from east to north"); }
public void TestLeft_1() { var mock = new Mock <IActionValidator>(); mock.Setup(m => m.Validate(It.IsAny <int>(), It.IsAny <int>())).Returns(false); IActionable robot = new TableRobot(mock.Object); var originalState = robot.ToString(); robot.Left(); var newState = robot.ToString(); Assert.AreEqual(originalState, newState, "Left action failed when validation is not passed"); }