Package org.eclipse.jgit.http.server.glue

Examples of org.eclipse.jgit.http.server.glue.MetaServlet


    server.tearDown();
  }

  @Test
  public void testSimpleRegex() throws Exception {
    MetaServlet s = new MetaServlet();
    s.serveRegex("^(/a|/b)$").with(new Servlet("test"));
    ctx.addServlet(new ServletHolder(s), "/*");
    server.setUp();

    final URI uri = server.getURI();
    HttpURLConnection c;
View Full Code Here


    assertEquals(404, c.getResponseCode());
  }

  @Test
  public void testServeOrdering() throws Exception {
    MetaServlet s = new MetaServlet();
    s.serveRegex("^(/a)$").with(new Servlet("test1"));
    s.serveRegex("^(/a+)$").with(new Servlet("test2"));
    ctx.addServlet(new ServletHolder(s), "/*");
    server.setUp();

    final URI uri = server.getURI();
    HttpURLConnection c;
View Full Code Here

    assertEquals(null, r.readLine());
  }

  @Test
  public void testRegexGroupFilter() throws Exception {
    MetaServlet s = new MetaServlet();
    s.serveRegex("^(/a)(/b)$")
        .with(new Servlet("test1"));
    s.serveRegex("^(/c)(/d)$")
        .through(new RegexGroupFilter(1))
        .with(new Servlet("test2"));
    s.serveRegex("^(/e)/f(/g)$")
        .through(new RegexGroupFilter(2))
        .with(new Servlet("test3"));
    ctx.addServlet(new ServletHolder(s), "/*");
    server.setUp();

 
View Full Code Here

TOP

Related Classes of org.eclipse.jgit.http.server.glue.MetaServlet

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.