Package httl.spi

Examples of httl.spi.Loader


  @SuppressWarnings("unchecked")
  @Test
  public void testTemplate() throws Exception {
    Engine engine = Engine.getEngine(config);
    Loader loader = engine.getProperty("loader", Loader.class);
    assertEquals(MultiLoader.class, loader.getClass());
    Loader[] loaders = engine.getProperty("loaders", Loader[].class);
    assertEquals(ClasspathLoader.class, loaders[0].getClass());
    loader = engine.getProperty("loaders", ClasspathLoader.class);
    assertEquals(ClasspathLoader.class, loader.getClass());
    String[] suffixes = engine.getProperty("template.suffix", new String[] { ".httl" });
    List<String> list = loader.list(suffixes[0]);
    assertTrue(list.size() > 0);
    String dir = engine.getProperty("template.directory", "");
    if (dir.length() > 0 && dir.startsWith("/")) {
      dir = dir.substring(1);
    }
View Full Code Here

TOP

Related Classes of httl.spi.Loader

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.