Esempio n. 1
0
        public HomeModule()
        {
            Get["/"] = _ => View["index.cshtml"];

            Post["/result"] = _ =>
            {
                RepeatCounter counter = new RepeatCounter();
                return(View["result.cshtml", counter.CounterRepeats(Request.Form["userWord"], Request.Form["userStrings"])]);
            };
        }
Esempio n. 2
0
 public void RepeatCounterCheck_ForUserInput_0()
 {
   RepeatCounter repeatCounterTest = new RepeatCounter();
   Assert.Equal(0, repeatCounterTest.CounterRepeats("", ""));
 }
Esempio n. 3
0
 public void RepeatCounterCheck_ForUserInputHELLO_HerloHEllohelloHELLO_2()
 {
   RepeatCounter repeatCounterTest = new RepeatCounter();
   Assert.Equal(3, repeatCounterTest.CounterRepeats("HELLO", "Herlo HEllo hello HELLO"));
 }
Esempio n. 4
0
 public void RepeatCounterCheck_ForUserInputHello_HelloGoodbyeHello_2()
 {
   RepeatCounter repeatCounterTest = new RepeatCounter();
   Assert.Equal(2, repeatCounterTest.CounterRepeats("Hello", "Hello Goodbye Hello"));
 }