Esempio n. 1
0
        public void LeetSpeakTranslator_ReplacesSsWithZs_True()
        {
            string testString = "As";
            LeetSpeakTranslator testLeetSpeakTranslator = new LeetSpeakTranslator();

            Assert.Equal("Az", testLeetSpeakTranslator.Translate(testString));
        }
Esempio n. 2
0
        public void LeetSpeakTranslator_ReplacesIsWithOnes_true()
        {
            string testString = "Inn";
            LeetSpeakTranslator testLeetSpeakTranslator = new LeetSpeakTranslator();

            Assert.Equal("1nn", testLeetSpeakTranslator.Translate(testString));
        }
Esempio n. 3
0
        public void LeetSpeakTranslator_ReplaceEsWithThrees_True()
        {
            string testString = "Help";
            LeetSpeakTranslator testLeetSpeakTranslator = new LeetSpeakTranslator();

            Assert.Equal("H3lp", testLeetSpeakTranslator.Translate(testString));
        }
Esempio n. 4
0
        public void LeetSpeakTranslator_ReplacesWordsThatStartWithSWithZ_False()
        {
            string testString = "As Sam";
            LeetSpeakTranslator testLeetSpeakTranslator = new LeetSpeakTranslator();

            Assert.Equal("Az Sam", testLeetSpeakTranslator.Translate(testString));
        }
Esempio n. 5
0
        public void LeetSpeakTranslator_ForWord_h3llo()
        {
            LeetSpeakTranslator testTranslator = new LeetSpeakTranslator();

            Console.WriteLine(testTranslator.Translate("been"));
            Assert.Equal("b33n", testTranslator.Translate("been"));
        }
Esempio n. 6
0
        public void LeetSpeakTranslator_ForO_d00r()
        {
            LeetSpeakTranslator testTranslator = new LeetSpeakTranslator();

            Console.WriteLine(testTranslator.Translate("door"));
            Assert.Equal("d00r", testTranslator.Translate("door"));
        }
Esempio n. 7
0
        public void LeetSpeakTranslator_ForLetterE_3()
        {
            LeetSpeakTranslator testTranslator = new LeetSpeakTranslator();

            Assert.Equal("3", testTranslator.Translate("e"));
            Console.WriteLine(testTranslator.Translate("e"));
        }
Esempio n. 8
0
        public void LeetSpeakTranslator_ReplacesOsWithZeros_True()
        {
            string testString = "Dog";
            LeetSpeakTranslator testLeetSpeakTranslator = new LeetSpeakTranslator();

            Assert.Equal("D0g", testLeetSpeakTranslator.Translate(testString));
        }
Esempio n. 9
0
        public void LeetSpeakTranslator_ReplacesLowerCaseIsWithOnes_false()
        {
            string testString = "I dig";
            LeetSpeakTranslator testLeetSpeakTranslator = new LeetSpeakTranslator();

            Assert.Equal("1 dig", testLeetSpeakTranslator.Translate(testString));
        }
        public void _TranslateLeetSpeak_true()
        {
            LeetSpeakTranslator newLeetWord = new LeetSpeakTranslator("ideas sies");
            string testWord = newLeetWord.Translate("ideas sies");

            System.Console.WriteLine("'" + testWord + "'");
            Assert.Equal(true, testWord == "1d3az s13z");
        }
Esempio n. 11
0
 public HomeModule()
 {
     Get["/"] = _ => View["input_form.cshtml"];
       Post["/results"] = _ => {
     string userInput = Request.Form["sentence"];
     LeetSpeakTranslator newTranslator = new LeetSpeakTranslator();
     string result = newTranslator.Translate(userInput);
     return View["results.cshtml", result];
       };
 }
Esempio n. 12
0
 public HomeModule()
 {
     Get["/"]        = _ => View["index.cshtml"];
     Post["/submit"] = _ => {
         string userInput = Request.Form["UserInput"];
         LeetSpeakTranslator translator = new LeetSpeakTranslator(userInput);
         string translatedInput         = translator.Translate(userInput);
         return(View["index.cshtml", translatedInput]);
     };
 }
Esempio n. 13
0
 public HomeModule()
 {
     Get["/"]         = _ => View["input_form.cshtml"];
     Post["/results"] = _ => {
         string userInput = Request.Form["sentence"];
         LeetSpeakTranslator newTranslator = new LeetSpeakTranslator();
         string result = newTranslator.Translate(userInput);
         return(View["results.cshtml", result]);
     };
 }
Esempio n. 14
0
        public static void Main()
        {
            Console.WriteLine("Welcome to the Leet Speak Translator!");
            Console.WriteLine("Enter some text to translate:");
            string input = Console.ReadLine();
            LeetSpeakTranslator translator = new LeetSpeakTranslator();
            string output = translator.Translate(input);

            Console.WriteLine(output);
        }
Esempio n. 15
0
 public HomeModule()
 {
     Get["/"] = _ => {
         return(View["index.cshtml"]);
     };
     Get["/translate"] = _ => {
         LeetSpeakTranslator translator = new LeetSpeakTranslator();
         string result = translator.Translate(Request.Query["input"]);
         return(View["index.cshtml", result]);
     };
 }
Esempio n. 16
0
        public void LeetSpeakTranslator_ForWordStartingWithS_S()
        {
            LeetSpeakTranslator testTranslator = new LeetSpeakTranslator();

            Assert.Equal("D0n't y0u l0v3 th3z3 'String' 3x3rciz3z? 1 d0!", testTranslator.Translate("Don't you love these 'String' exercises? I do!"));
        }
Esempio n. 17
0
        public void LeetSpeakTranslator_ForS_Z()
        {
            LeetSpeakTranslator testTranslator = new LeetSpeakTranslator();

            Assert.Equal("pizz", testTranslator.Translate("piss"));
        }
Esempio n. 18
0
        public void LeetSpeakTranslator_ForI_1()
        {
            LeetSpeakTranslator testTranslator = new LeetSpeakTranslator();

            Assert.Equal("1 am", testTranslator.Translate("I am"));
        }
Esempio n. 19
0
 public void LeetSpeakTranslator_ForI_1()
 {
     LeetSpeakTranslator testTranslator = new LeetSpeakTranslator();
       Assert.Equal("1 am", testTranslator.Translate("I am"));
 }
Esempio n. 20
0
 public void LeetSpeakTranslator_ForLetterE_3()
 {
     LeetSpeakTranslator testTranslator = new LeetSpeakTranslator();
       Assert.Equal("3", testTranslator.Translate("e"));
       Console.WriteLine(testTranslator.Translate("e"));
 }
Esempio n. 21
0
 public void LeetSpeakTranslator_ForO_d00r()
 {
     LeetSpeakTranslator testTranslator = new LeetSpeakTranslator();
       Console.WriteLine(testTranslator.Translate("door"));
       Assert.Equal("d00r", testTranslator.Translate("door"));
 }
Esempio n. 22
0
 public void LeetSpeakTranslator_ForS_Z()
 {
     LeetSpeakTranslator testTranslator = new LeetSpeakTranslator();
       Assert.Equal("pizz", testTranslator.Translate("piss"));
 }
Esempio n. 23
0
 public void LeetSpeakTranslator_ForWordStartingWithS_S()
 {
     LeetSpeakTranslator testTranslator = new LeetSpeakTranslator();
       Assert.Equal("D0n't y0u l0v3 th3z3 'String' 3x3rciz3z? 1 d0!", testTranslator.Translate("Don't you love these 'String' exercises? I do!" ));
 }
Esempio n. 24
0
 public void LeetSpeakTranslator_ForWord_h3llo()
 {
     LeetSpeakTranslator testTranslator = new LeetSpeakTranslator();
       Console.WriteLine(testTranslator.Translate("been"));
       Assert.Equal("b33n", testTranslator.Translate("been"));
 }