コード例 #1
0
        public void IsRotationOfTwo_Not()
        {
            IsRotationOfTwo isRotation = new IsRotationOfTwo();
            bool            result     = isRotation.isRotation("geeksforgeeks", "geeksgeeksfor");

            Assert.False(result);
        }
コード例 #2
0
        public void IsRotationOfTwo()
        {
            IsRotationOfTwo isRotation = new IsRotationOfTwo();
            bool            result     = isRotation.isRotation("amazon", "azonam");

            Assert.True(result);
        }
コード例 #3
0
        public void IsRotationOfTwo_ThreeLetters()
        {
            IsRotationOfTwo isRotation = new IsRotationOfTwo();
            bool            result     = isRotation.isRotation("abc", "cab");

            Assert.True(result);
            result = isRotation.isRotation("abc", "bca");
            Assert.True(result);
        }