public void Should_Display_Good_Text() { string[] args = new string[]{"get","-url","http://webbdoger93.free.fr/testNurl/hello.html"}; Parser p = new Parser(args); p.parseArgs(); Core c = new Core(p.Line); Assert.AreEqual("<h1>Hello test<h1>",c.executeGet()); }
public void Should_Display_Error_On_Fake_Url() { string[] args = new string[]{"get","-url","http://horloge.parlante.onlineERREUR.fr/"}; Parser p = new Parser(args); p.parseArgs(); Core c = new Core(p.Line); Assert.AreEqual("<h1>You're entered a fake url</h1>",c.executeGet()); }