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

            var result = ZigZagConversion.Convert(input, 4);

            Assert.AreEqual("PINAASRGYHPLII", result);
        }
        public void Convert_1_Row()
        {
            var input = "PAYPALISHIRING";

            var result = ZigZagConversion.Convert(input, 1);

            Assert.AreEqual("PAYPALISHIRING", result);
        }
        public void Convert_3_Row()
        {
            var input = "PAYPALISHIRING";

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

            Assert.AreEqual("PAHNAPLSIIGYIR", result);
        }
        public void Convert_2_Row()
        {
            var input = "PAYPALISHIRING";

            var result = ZigZagConversion.Convert(input, 2);

            Assert.AreEqual("PPIINAYALSHRIG", result);
        }
        public void TestV3(string input, int rowNumber, string expected)
        {
            var actul = new ZigZagConversion();

            var rslt = actul.ConvertV3(input, rowNumber);

            Assert.Equal(expected, rslt);
        }
Exemple #6
0
        public void Convert_ShouldConvert_StringToZigZag(
            string input,
            int numberOfRows,
            string expectedOutput)
        {
            // Arrange
            var converter = new ZigZagConversion();

            // Act
            var output = converter.Convert(input, numberOfRows);

            // Assert
            output.Should().Be(expectedOutput);
        }
Exemple #7
0
 public void BeforeEach()
 {
     ZigZagConversion = new ZigZagConversion();
 }
Exemple #8
0
 public string TestSolution(string s, int rows)
 {
     return(ZigZagConversion.Solution(s, rows));
 }
Exemple #9
0
 public ZigZagConversionTests()
 {
     _objUnderTest = new ZigZagConversion();
 }