public void MoveDown() { // This section details with the intial setup of the test SLMMController controller = new SLMMController(); MowerSession postback = controller.LawnDimensions(10, 10); MowerSession session = controller.MoveDown(postback); // This check is to make sure that the user moves to the correct position Assert.AreEqual(session.PositionX, 1); Assert.AreEqual(session.PositionY, 2); }
public void MoveUp() { // This section details with the intial setup of the test SLMMController controller = new SLMMController(); MowerSession postback = controller.LawnDimensions(10, 10); MowerSession session = controller.MoveUp(postback); // This tests for two things first it makes sure that the method comes back with the correct // information but it is also check to see if the clamp method in the controller is making // sure that the mower does not go out of bounds Assert.AreEqual(session.PositionX, 1); Assert.AreEqual(session.PositionY, 1); }
public void LawnDimensions() { // This section details with the intial setup of the test SLMMController controller = new SLMMController(); MowerSession session = controller.LawnDimensions(10, 10); //This assert checks to see if the width entered intially in the method is the same width that comes // out Assert.AreEqual(10, session.Width); // This assert checks to see if the height entered initially in the method is the same height that comes // out Assert.AreEqual(10, session.Height); }
public void MowerPosition() { // This section details with the intial setup of the test SLMMController controller = new SLMMController(); MowerSession postback = controller.LawnDimensions(10, 10); MowerSession session = controller.MowerPosition(2, 5, postback); // This checks to see if the actual Position X given initally is the same // as the one that is actually assigned Assert.AreEqual(2, session.PositionX); // This checks to see if the actual Position Y given initally is the same // as the one that is actually assigned Assert.AreEqual(5, session.PositionY); }