public void PlateauWidthOrLengthIsNegativeShouldThrowException() { var instructionSet = new InstructionSet(); instructionSet.Add("5 -1"); instructionSet.GetPlateau(); }
public void PlateauSizeMissWidthOrLengthShouldThrowException() { var instructionSet = new InstructionSet(); instructionSet.Add("55"); instructionSet.GetPlateau(); }
public void InvalidPlateauWestToEastLengthShouldThrowException() { var instructionSet = new InstructionSet(); instructionSet.Add("A 55"); instructionSet.GetPlateau(); }
public void InvalidPlateauSouthToNorthLengthShouldThrowException() { var instructionSet = new InstructionSet(); instructionSet.Add("55 A"); instructionSet.GetPlateau(); }
public void CorrectPlateauSizeTest() { var instructionSet = new InstructionSet(); instructionSet.Add("5 3"); Plateau plateau = instructionSet.GetPlateau(); Assert.AreEqual(5, plateau.WestToEastLength); Assert.AreEqual(3, plateau.SouthToNorthLength); }
public static RobotCollection LandingRobots(InstructionSet instructionSet) { var robotCollection = new RobotCollection(); Plateau plateau = instructionSet.GetPlateau(); foreach (IInstruction instruction in instructionSet) { var robot = new Robot(robotCollection.Count , instruction.GetLandingPosition() , instruction.GetLandingHeading() , instruction.GetMovingSequence() , plateau); robotCollection.Add(robot); } return robotCollection; }
public void NoPlateauInfoShouldThrowException() { var instructionSet = new InstructionSet(); instructionSet.GetPlateau(); }