public HomeModule() { Get["/"] = _ => View["index.cshtml"]; Post["/PPform"] = _ => { PingPong newPingPong = new PingPong(); string newChangedValues = newPingPong.IsNumber(Request.Form["userInput"]); return View["results.cshtml", newChangedValues]; }; }
public void IsNumber_DivisibleByThree_true() { PingPong newPingPong = new PingPong(); string newChangedValues = newPingPong.IsNumber("4"); Assert.Equal("12ping4", newChangedValues); }
public void IsNumber_NotDivisibleByThreeFiveFifteen_false() { PingPong newPingPong = new PingPong(); string newChangedValues = newPingPong.IsNumber("2"); Assert.Equal("12", newChangedValues); }
public void IsNumber_DivisibleByFifteen_true() { PingPong newPingPong = new PingPong(); string newChangedValues = newPingPong.IsNumber("15"); Assert.Equal("12ping4pongping78pingpong11ping1314ping-pong", newChangedValues); }