示例#1
0
        public void SwitchLetter_NonLetterSymbol()
        {
            string unencodedSymbol       = "%";
            int    offset                = 1;
            string expectedEncodedSymbol = "%";
            string actualEncodedSymbol;

            CipherEncoder encoder = new CipherEncoder();

            actualEncodedSymbol = encoder.SwitchLetter(unencodedSymbol, offset);

            Assert.AreEqual(expectedEncodedSymbol, actualEncodedSymbol, "Switched letters are not equal");
        }
示例#2
0
        public void SwitchLetter_UppercaseLetter()
        {
            string unencodedLetter       = "A";
            int    offset                = 1;
            string expectedEncodedLetter = "B";
            string actualEncodedLetter;

            CipherEncoder encoder = new CipherEncoder();

            actualEncodedLetter = encoder.SwitchLetter(unencodedLetter, offset);

            Assert.AreEqual(expectedEncodedLetter, actualEncodedLetter, "Switched letters are not equal");
        }