public void Translate_DisplayTheRightChars_Letter()
        {
            LeetSpeakTranslator testLeetSpeak = new LeetSpeakTranslator();

            Assert.AreEqual("3", testLeetSpeak.Translate("e"));
            Assert.AreEqual("0", testLeetSpeak.Translate("o"));
            Assert.AreEqual("1", testLeetSpeak.Translate("I"));
            Assert.AreEqual("7", testLeetSpeak.Translate("t"));
            Assert.AreEqual("z", testLeetSpeak.Translate("s"));
        }
Пример #2
0
        static void Main()
        {
            Console.WriteLine("Please enter a word to translate to l33t sp34k:");
            string input = Console.ReadLine();
            LeetSpeakTranslator myTranslator = new LeetSpeakTranslator();
            string output = myTranslator.Translate(input);

            Console.WriteLine(output);
        }
        public void Does_example_string_match()
        {
            LeetSpeakTranslator testLST = new LeetSpeakTranslator();

            Assert.AreEqual("D0n'7 y0u l0v3 7h3z3 \"S7ring\" 3x3rciz3z? 1 d0!", testLST.Translate("Don't you love these \"String\" exercises? I do!"));
        }
        public void Does_t_become_7_true()
        {
            LeetSpeakTranslator testLST = new LeetSpeakTranslator();

            Assert.AreEqual("7", testLST.Translate("t"));
        }
        public void Translate_DisplayTheWrongChars_Else()
        {
            LeetSpeakTranslator testLeetSpeak = new LeetSpeakTranslator();

            Assert.AreEqual("else", testLeetSpeak.Translate("b"));
        }
Пример #6
0
        public void Translator_LetterOReplacedWith_0()
        {
            LeetSpeakTranslator testTwo = new LeetSpeakTranslator();

            Assert.AreEqual("0", testTwo.Translate("o"));
        }
Пример #7
0
        public void LeetSpeakTranslate_ConvertETo3_True()
        {
            LeetSpeakTranslator leetSpeak = new LeetSpeakTranslator();

            Assert.AreEqual("33", leetSpeak.Translate("Ee"));
        }
Пример #8
0
        public void LeetSpeakTranslate_ConvertTTo7_True()
        {
            LeetSpeakTranslator leetSpeak = new LeetSpeakTranslator();

            Assert.AreEqual("7abl3", leetSpeak.Translate("Table"));
        }
Пример #9
0
        public void DoesLeetSpeakTranslator_Return1ForI()
        {
            LeetSpeakTranslator testLeetSpeakTranslator = new LeetSpeakTranslator();

            Assert.AreEqual("1", testLeetSpeakTranslator.Translate("I"));
        }
Пример #10
0
        public void DoesLeetSpeakTranslator_Return0Foro()
        {
            LeetSpeakTranslator testLeetSpeakTranslator = new LeetSpeakTranslator();

            Assert.AreEqual("00", testLeetSpeakTranslator.Translate("Oo"));
        }
Пример #11
0
        public void DoesLeetSpeakTranslator_Return3ForE()
        {
            LeetSpeakTranslator testLeetSpeakTranslator = new LeetSpeakTranslator();

            Assert.AreEqual("33", testLeetSpeakTranslator.Translate("Ee"));
        }
Пример #12
0
        public void Translator_LetterAReplacedWith_4()
        {
            LeetSpeakTranslator testSix = new LeetSpeakTranslator();

            Assert.AreEqual("4", testSix.Translate("a"));
        }
Пример #13
0
        public void Translator_LetterSReplacedWith_Z()
        {
            LeetSpeakTranslator testFive = new LeetSpeakTranslator();

            Assert.AreEqual("sn4k3z", testFive.Translate("snakes"));
        }
Пример #14
0
        public void Translator_LetterTReplacedWith_7()
        {
            LeetSpeakTranslator testFour = new LeetSpeakTranslator();

            Assert.AreEqual("7", testFour.Translate("t"));
        }
Пример #15
0
        public void Translator_LetterIReplacedWith_1()
        {
            LeetSpeakTranslator testThree = new LeetSpeakTranslator();

            Assert.AreEqual("1", testThree.Translate("I"));
        }
Пример #16
0
        public void LeetSpeakTranslate_ConvertOTo0_True()
        {
            LeetSpeakTranslator leetSpeak = new LeetSpeakTranslator();

            Assert.AreEqual("H3ll0", leetSpeak.Translate("Hello"));
        }
Пример #17
0
        public void LeetSpeakTranslate_ConvertITo1_True()
        {
            LeetSpeakTranslator leetSpeak = new LeetSpeakTranslator();

            Assert.AreEqual("1lluzi0n", leetSpeak.Translate("Illusion"));
        }
Пример #18
0
        public void DoesLeetSpeakTranslator_Return7Fort()
        {
            LeetSpeakTranslator testLeetSpeakTranslator = new LeetSpeakTranslator();

            Assert.AreEqual("77", testLeetSpeakTranslator.Translate("Tt"));
        }
Пример #19
0
        public void LeetSpeakTranslate_ConvertSTozIfNotFirstLetter_True()
        {
            LeetSpeakTranslator leetSpeak = new LeetSpeakTranslator();

            Assert.AreEqual("Sazzy", leetSpeak.Translate("Sassy"));
        }
Пример #20
0
        public void DoesLeetSpeakTranslator_ReturnzFors()
        {
            LeetSpeakTranslator testLeetSpeakTranslator = new LeetSpeakTranslator();

            Assert.AreEqual("Szz", testLeetSpeakTranslator.Translate("SSs"));
        }
Пример #21
0
        public void Translate_forAllCharactersToBeReplaced_returnReplacement()
        {
            LeetSpeakTranslator testLeetSpeak = new LeetSpeakTranslator();

            Assert.Equal("3017", testLeetSpeak.Translate("eoIt"));
        }
Пример #22
0
        public void Translator_LetterEReplacedWith_3()
        {
            LeetSpeakTranslator testOne = new LeetSpeakTranslator();

            Assert.AreEqual("3", testOne.Translate("e"));
        }