Esempio n. 1
0
        public void ParseInstruction_RotateRight()
        {
            //rotate left/right X steps means that the whole string should be rotated; for example, one right rotation would turn abcd into dabc.
            _day21.Password = "******";
            var instruction = "rotate right 1 step";

            _day21.Rotate(instruction);
            Assert.AreEqual(_day21.Password, "dabc");
        }
Esempio n. 2
0
        public void RotateTest(string input, string expected, int steps, bool isRight)
        {
            var actual = day21.Rotate(input, steps, isRight);

            Assert.AreEqual(expected, actual);
        }