Example #1
0
  public void testConfigList() throws Exception {
    Page page = getPage("/fallbackme/index.html");
    PageSettings back = page.getPageSettings().getParent();
    assertNotNull(back);
    assertTrue(back.getPath().endsWith("/fallbackme/_site.xconf"));
    back = (PageSettings) back.getParent();
    assertTrue(back.getPath().endsWith("/_site.xconf"));

    PageSettings fback = page.getPageSettings().getFallback();
    assertNotNull(fback);
    assertTrue(fback.getPath().endsWith("/fallbackfiles/index.xconf"));
    fback = fback.getParent();
    assertTrue(fback.getPath().endsWith("/fallbackfiles/_site.xconf"));
    fback = fback.getParent();
    assertTrue(fback.getPath().endsWith("/_site.xconf"));
  }
Example #2
0
  public void testBaseWebInfFallBack() throws Exception {
    Page page = getPage("/autofallback/sub/index.html");
    assertTrue(page.getPageSettings().getPath().endsWith("/autofallback/sub/index.xconf"));
    PageSettings back = page.getPageSettings().getParent();
    assertNotNull(back);
    assertTrue(back.getPath().endsWith("/autofallback/sub/_site.xconf"));
    back = (PageSettings) back.getParent();
    assertTrue(back.getPath().endsWith("/autofallback/_site.xconf"));
    back = (PageSettings) back.getParent();
    assertTrue(back.getPath().endsWith("/_site.xconf"));

    PageSettings fback = page.getPageSettings().getFallback();
    assertNotNull(fback);
    assertTrue(fback.getPath().endsWith("/WEB-INF/base/autofallback/sub/index.xconf"));
    fback = fback.getParent();
    assertTrue(fback.getPath().endsWith("/WEB-INF/base/autofallback/sub/_site.xconf"));
    fback = fback.getParent();
    assertTrue(fback.getPath().endsWith("/WEB-INF/base/autofallback/_site.xconf"));
    fback = fback.getParent();
    assertTrue(fback.getPath().endsWith("/WEB-INF/base/_site.xconf"));

    //		String il = page.getPageSettings().getInnerLayout();
    //		assertEquals("/autofallback/sub/layout0.html", il);
    //		Page ilpage = getPage(il);
    //		String ol = ilpage.getPageSettings().getInnerLayout();
    //		//assertEquals("/layout1.html", ol);

    String il = page.getInnerLayout();
    assertEquals("/autofallback/sub/layout0.html", il);
    Page ilpage = getPage(il);
    String ol = ilpage.getInnerLayout();
    assertEquals("/layout1.html", ol);
  }