public void ConvertTest_General()
        {
            var input = "PAYPALISHIRING";

            var solution = new _006_ZigZagConversion();

            var result = solution.Convert(input, 3);
            Assert.AreEqual("PAHNAPLSIIGYIR", result);

            result = solution.Convert(input, 4);
            Assert.AreEqual("PINALSIGYAHRPI", result);

            result = solution.Convert(input, 5);
            Assert.AreEqual("PHASIYIRPLIGAN", result);
        }
Esempio n. 2
0
        public void ConvertTest_General()
        {
            var input = "PAYPALISHIRING";

            var solution = new _006_ZigZagConversion();

            var result = solution.Convert(input, 3);

            Assert.AreEqual("PAHNAPLSIIGYIR", result);

            result = solution.Convert(input, 4);
            Assert.AreEqual("PINALSIGYAHRPI", result);

            result = solution.Convert(input, 5);
            Assert.AreEqual("PHASIYIRPLIGAN", result);
        }
        public void ConvertTest_RowNumberEqualZero()
        {
            var input = "PAYPALISHIRING";

            var solution = new _006_ZigZagConversion();

            var result = solution.Convert(input, 0);
            Assert.AreEqual(input, result);
        }
        public void ConvertTest_EmptyString()
        {
            var input = string.Empty;

            var solution = new _006_ZigZagConversion();

            var result = solution.Convert(input, 0);
            Assert.AreEqual(input, result);
        }
Esempio n. 5
0
        public void ConvertTest_EmptyString()
        {
            var input = string.Empty;

            var solution = new _006_ZigZagConversion();

            var result = solution.Convert(input, 0);

            Assert.AreEqual(input, result);
        }
Esempio n. 6
0
        public void ConvertTest_RowNumberEqualZero()
        {
            var input = "PAYPALISHIRING";

            var solution = new _006_ZigZagConversion();

            var result = solution.Convert(input, 0);

            Assert.AreEqual(input, result);
        }