Package org.richfaces.test.staging

Examples of org.richfaces.test.staging.ServerResource


    root.addResource(ServerResourcePath.WEB_XML, webXml);
    assertEquals(1, root.getPaths().size());
    MockResource facesConfig = new MockResource();
    root.addResource(ServerResourcePath.FACES_CONFIG, facesConfig);
    assertEquals(1, root.getPaths().size());
    ServerResource webInf = root.getResource(ServerResourcePath.WEB_INF);
    assertNotNull(webInf);
    assertEquals(2, webInf.getPaths().size());
    assertSame(webXml, webInf
        .getResource(new ServerResourcePath("/web.xml")));
    assertSame(facesConfig, webInf.getResource(new ServerResourcePath(
        "/faces-config.xml")));
  }
View Full Code Here


  @Test
  public void testGetResource() {
    ServerResourcesDirectory root = new ServerResourcesDirectory();
    MockResource webXml = new MockResource();
    root.addResource(ServerResourcePath.WEB_XML, webXml);
    ServerResource webInf = root.getResource(ServerResourcePath.WEB_INF);
    assertNotNull(webInf);
    assertNull(root.getResource(new ServerResourcePath("/foo")));
    assertNull(root.getResource(new ServerResourcePath("/foo/baz")));
    assertEquals(1, root.getPaths().size());
    assertNull(root.getResource(new ServerResourcePath(
        "/WEB-INF/web.xml/foo")));
    assertSame(webXml, webInf.getResource(new ServerResourcePath(
        "/web.xml")));
  }
View Full Code Here

  @Test
  public void testGetResourceRoot() {
    ServerResourcesDirectory root = new ServerResourcesDirectory();
    MockResource indexXhtml = new MockResource();
    root.addResource(new ServerResourcePath("/index.xhtml"), indexXhtml);
    ServerResource index = root.getResource(new ServerResourcePath("/index.xhtml"));
    assertNotNull(index);
    assertNull(root.getResource(new ServerResourcePath("/foo")));
    assertNull(root.getResource(new ServerResourcePath("/foo/baz")));
    assertEquals(1, root.getPaths().size());
  }
View Full Code Here

TOP

Related Classes of org.richfaces.test.staging.ServerResource

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.