Beispiel #1
0
        public void ReadRoverInstructions_InvalidBounds()
        {
            RoverController rc = new RoverController();

            string[] instructions =
            {
                "3 -3",
                "1 1 N",
                "MRMM"
            };

            Assert.ThrowsException <InvalidDataException>(() => rc.ReadInstructions(instructions));
        }
Beispiel #2
0
        public void ReadRoverInstructions()
        {
            RoverController rc = new RoverController();

            string[] instructions =
            {
                "3 3",
                "1 1 N",
                "MRMM"
            };
            string expected = $"3 2 E{Environment.NewLine}";

            string actual = rc.ReadInstructions(instructions);

            Assert.AreEqual(expected, actual);
        }