Package org.jbehave.core.io.rest.xwiki

Examples of org.jbehave.core.io.rest.xwiki.IndexFromXWiki.indexResources()


  @Test
  public void canIndexFromPaths() {
    IndexWithBreadcrumbs indexer = new IndexFromXWiki();
    String rootURI = "http://localhost:8080/xwiki/rest/wikis/xwiki/spaces/Main/pages";
    String syntax = "jbehave/3.0";
    Map<String, Resource> index = indexer.indexResources(rootURI, "src/test/resources", syntax, "stories/**");
    assertThat(index.containsKey("a_first"), equalTo(true));
    Resource first = index.get("a_first");
    assertThat(first.getURI(), equalTo(rootURI + "/a_first"));
    assertThat(first.getParentName(), equalTo("stories"));
    assertThat(join(first.getBreadcrumbs(), "/"), equalTo("stories"));
View Full Code Here


  @Test
  public void canIndexFromPathsWithDefaultSyntax() {
    IndexWithBreadcrumbs indexer = new IndexFromXWiki();
    String rootURI = "http://localhost:8080/xwiki/rest/wikis/xwiki/spaces/Main/pages";
    String syntax = null;
    Map<String, Resource> index = indexer.indexResources(rootURI, "src/test/resources", syntax, "stories/**");
    assertThat(index.containsKey("a_first"), equalTo(true));
    Resource first = index.get("a_first");
    assertThat(first.hasSyntax(), equalTo(false));
  }

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.