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

Examples of org.jbehave.core.io.rest.xwiki.IndexFromXWiki


    ResourceIndexer newResourceIndexer() {
        if (restProvider.equals(REDMINE)) {
            return new IndexFromRedmine(restUsername, restPassword);
        }
        if (restProvider.equals(XWIKI)) {
            return new IndexFromXWiki(restUsername, restPassword);
        }
        if (restProvider.equals(CONFLUENCE)) {
            return new IndexFromConfluence(restUsername, restPassword);
        }
        throw new RuntimeException("Unsupported ResourceIndexer provider " + restProvider);
View Full Code Here


public class IndexWithBreadcrumbsBehaviour {

  @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

    assertThat(third.getSyntax(), equalTo(syntax));
  }

  @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

  private ResourceIndexer resourceIndexer() {
    if (providerName.equals("Redmine")) {
      return new IndexFromRedmine();
    } else if (providerName.equals("XWiki")) {
      return new IndexFromXWiki();
    }
    throw new RuntimeException("Provider not supported: " + providerName);
  }
View Full Code Here

TOP

Related Classes of org.jbehave.core.io.rest.xwiki.IndexFromXWiki

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.