コード例 #1
0
        public void Test3()
        {
            //Arrange
            var dial     = "goodingxxixxxd";
            var key      = "gdid";
            var expected = 9;

            //Act
            var sol = new FreedomTrail.Solution();
            var res = sol.FindRotateSteps(dial, key);

            //Assert
            Assert.AreEqual(expected, res);
        }
コード例 #2
0
        public void Test4()
        {
            //Arrange
            var dial     = "caotmcaataijjxi";
            var key      = "oatjiioicitatajtijciocjcaaxaaatmctxamacaamjjx";
            var expected = 137;

            //Act
            var sol = new FreedomTrail.Solution();
            var res = sol.FindRotateSteps(dial, key);

            //Assert
            Assert.AreEqual(expected, res);
        }
コード例 #3
0
        public void Test1()
        {
            //Arrange
            var dial     = "abcdef";
            var key      = "af";
            var expected = 3;

            //Act
            var sol = new FreedomTrail.Solution();
            var res = sol.FindRotateSteps(dial, key);

            //Assert
            Assert.AreEqual(expected, res);
        }