public void TestReport_1() { IActionable robot = new TableRobot(new FiveByFiveTableActionValidator()); var report = robot.Report(); Assert.AreEqual(string.Empty, report, "Report action failed - No report before robot gets placed onto the table"); }
public void TestReport_2() { IActionable robot = new TableRobot(new FiveByFiveTableActionValidator()); robot.Place(0, 0, Facing.NORTH); var report = robot.Report(); Assert.AreEqual("X: 0, Y: 0, Facing: NORTH", report, "Report action successful"); }
public void TestReport_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 report = robot.Report(); Assert.AreEqual(string.Empty, report, "Report action failed when validation is not passed"); }
public void TestReport_2() { 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(1, 1, Facing.WEST); var report = robot.Report(); Assert.AreEqual("X: 1, Y: 1, Facing: WEST", report, "Report action successful when validation is passed"); }