Package org.richfaces.test.staging

Examples of org.richfaces.test.staging.ServerResourcesDirectory.addResource()


   */
  @Test
  public void testAddResource() {
    ServerResourcesDirectory root = new ServerResourcesDirectory();
    MockResource webXml = new MockResource();
    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);
View Full Code Here


    ServerResourcesDirectory root = new ServerResourcesDirectory();
    MockResource webXml = new MockResource();
    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
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());
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
Copyright © 2018 www.massapi.com. 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.