コード例 #1
0
        public void WhenCalledToActThenReturnsAEastFacingPosition()
        {
            var rightInstruction = new RightInstruction();

            var newPosition = rightInstruction.TransformPosition(this.validPosition);

            Assert.AreEqual(Orientation.E, newPosition.Orientation);
        }
コード例 #2
0
        public void HaveTheCorrectCommand()
        {
            var rightInstruction = new RightInstruction();

            Assert.AreEqual('R', rightInstruction.Command);
        }
コード例 #3
0
        public void WhenCalledToActThenDoesNotAlterXOrY()
        {
            var rightInstruction = new RightInstruction();

            var newPosition = rightInstruction.TransformPosition(this.validPosition);

            Assert.AreEqual(0, newPosition.X);
            Assert.AreEqual(0, newPosition.Y);
        }