示例#1
0
        public void move_to_6_if_given_right_command_from_starting_position(string move)
        {
            var keypad = new ModifiedKeypad();

            keypad.Move(move);

            Assert.AreEqual('6', keypad.CurrentValue);
        }
示例#2
0
        public void remain_on_5_if_given_up_or_down_or_left_command_from_starting_position(string move)
        {
            var keypad = new ModifiedKeypad();

            keypad.Move(move);

            Assert.AreEqual('5', keypad.CurrentValue);
        }
示例#3
0
        public void move_down_when_given_down_command_from_starting_position_of_7(string move, int expectedValue)
        {
            var keypad = new ModifiedKeypad
            {
                XPosition = 2,
                YPosition = 2
            };

            keypad.Move(move);

            Assert.AreEqual(expectedValue, keypad.CurrentValue);
        }