Ejemplo n.º 1
0
 public Template(String uri) {
   Path existing = Resources.findExistingPath(uri);
   if (existing == null) {
     throw new IllegalArgumentException("Template not found " + uri);
   }
   this.path = existing;
 }
Ejemplo n.º 2
0
  @Test
  @SuppressWarnings("unchecked")
  public void parse_object() throws IOException {
    List<Object> members =
        (List<Object>) parser.parse(resources.sourceFile(Paths.get("_data", "members.yml")));

    assertThat(members).hasSize(3);
    assertThat((Map<String, Object>) members.get(0))
        .containsExactly(entry("name", "Tom Preston-Werner"), entry("github", "mojombo"));
  }