Example #1
0
        public void FinalTest_True()
        {
            Leetspeak testLeetspeak = new Leetspeak();
            string    sentence      = "Don't you love these 'String' exercises? I do!";
            string    leetSentence  = "D0n'7 y0u l0v3 7h3z3 'S7ring' 3x3rciz3z? 1 d0!";
            string    translated    = testLeetspeak.Translate(sentence);

            Console.WriteLine(translated);
            bool isLeet = (translated.Equals(leetSentence));

            Assert.AreEqual(true, isLeet);
        }
Example #2
0
        public void IsSReplaceByz_True()
        {
            Leetspeak testLeetspeak = new Leetspeak();
            string    sentence      = "SsS";
            string    leetSentence  = "Szz";
            string    translated    = testLeetspeak.Translate(sentence);

            Console.WriteLine(translated);
            bool isLeet = (translated.Equals(leetSentence));

            Assert.AreEqual(true, isLeet);
        }
Example #3
0
        public void Translate_replaceS_s()
        {
            Leetspeak testS = new Leetspeak();

            Assert.AreEqual("H3ll0 in 7h3r3 Sally", testS.Translate("Hello in there Sally"));
        }
Example #4
0
        public void Translate_replaceS_z()
        {
            Leetspeak testS = new Leetspeak();

            Assert.AreEqual("h3ll0 in 7h3r3 m3lizza", testS.Translate("Hello in there Melissa"));
        }