@Test public void testLocatorNoSuffix() throws IOException { TemplateLocator locator = FileSystemTemplateLocator.builder() .setRootPath("src/test/resources/locator/file").build(); MustacheEngineBuilder.newBuilder().addTemplateLocator(locator).build(); Set<String> ids = locator.getAllIdentifiers(); assertEquals(7, ids.size()); assertTrue(ids.contains("index.foo")); assertTrue(ids.contains("home.foo")); assertTrue(ids.contains("foo.foo")); assertTrue(ids.contains("detail.html")); assertTrue(ids.contains("encoding.html")); assertTrue(ids.contains("sub/bar.foo")); assertTrue(ids.contains("sub/subsub/qux.foo")); assertEquals("{{foo}}", read(locator.locate("index.foo"))); assertEquals("bar", read(locator.locate("home.foo"))); assertEquals("foo", read(locator.locate("foo.foo"))); assertEquals("<html/>", read(locator.locate("detail.html"))); assertEquals("{{foo}}", read(locator.locate("sub/bar.foo"))); assertEquals("{{bar}}", read(locator.locate("sub/subsub/qux.foo"))); }
public static Builder builder() { return new Builder(); }
FileSystemTemplateLocator extends FilePathTemplateLocator { public static Builder builder() { return new Builder(); } }
FileSystemTemplateLocator extends FilePathTemplateLocator { public static Builder builder() { return new Builder(); } FileSystemTemplateLocator(int priority, String rootPath);  FileSystemTemplateLocator(int priority, String rootPath,
            String suffix); }
FileSystemTemplateLocator extends FilePathTemplateLocator { public static Builder builder() { return new Builder(); } FileSystemTemplateLocator(int priority, String rootPath);  FileSystemTemplateLocator(int priority, String rootPath,
            String suffix); @Override Reader locateRealPath(String realPath); static Builder builder(); }
FileSystemTemplateLocator extends FilePathTemplateLocator { public static Builder builder() { return new Builder(); } FileSystemTemplateLocator(int priority, String rootPath);  FileSystemTemplateLocator(int priority, String rootPath,
            String suffix); @Override Reader locateRealPath(String realPath); static Builder builder();  }