コード例 #1
0
 protected WebContext loadPage(String content) throws Exception {
   server = getServer();
   String path = getName() + ".html";
   server.addPage(path, content);
   WebClient webClient = new WebClient();
   String url = server.getUrl(path);
   return new WebContext(webClient.getPage(url), webClient, project);
 }
コード例 #2
0
 @Override
 protected void tearDown() throws Exception {
   if (server != null) {
     server.stop();
   }
   super.tearDown();
 }
コード例 #3
0
 protected DummyWebServer getServer() throws Exception {
   if (server == null) {
     server = new DummyWebServer();
     server.start();
   }
   return server;
 }
コード例 #4
0
 protected String getUrl(String path) {
   return server.getUrl(path);
 }