Пример #1
0
        public void EncodeStringTest()
        {
            string decodedString  = Convert.ToString(TestContext.DataRow["decodedString"]);
            int    numberOfRails  = Convert.ToInt32(TestContext.DataRow["numberOfRails"]);
            string expectedResult = Convert.ToString(TestContext.DataRow["encodedString"]);

            string actualResult = RailFenceCipher.EncodeString(decodedString, numberOfRails);

            Assert.AreEqual(expectedResult, actualResult, "expected and actual results are not equal.\ndecodedString = " + decodedString + "\nnumberOfRails = " + numberOfRails);
        }