Esempio n. 1
0
        public void RotateTest_WhenDirectionInvalid_ShouldThrow()
        {
            var rotateDirection = 'N';
            var orientation     = Orientation.West;

            Assert.ThrowsException <InvalidRotationArgumentException>(() => RoverController.Rotate(rotateDirection, orientation));
        }
Esempio n. 2
0
        public void RotateTest_WhenDirectionValid_ShouldRotate()
        {
            var rotateDirection = 'L';
            var orientation     = Orientation.North;
            var expected        = Orientation.West;
            var actual          = RoverController.Rotate(rotateDirection, orientation);

            Assert.AreEqual(expected, actual);
        }