Package org.jbehave.core.io.rest

Examples of org.jbehave.core.io.rest.ResourceIndexer.indexResources()


        ResourceLoader loader = mock(ResourceLoader.class);
        String rootURI = "http://wiki";
        Map<String, Resource> index = new HashMap<String, Resource>();
        index.put("one", new Resource(rootURI + "/one"));
        index.put("two", new Resource(rootURI + "/two"));
        when(indexer.indexResources(rootURI)).thenReturn(index);
        String text1 = "story text 1";
        when(loader.loadResourceAsText(index.get("one").getURI())).thenReturn(text1);
        String text2 = "story text 2";
        when(loader.loadResourceAsText(index.get("two").getURI())).thenReturn(text2);
View Full Code Here


        Resource aResource = new Resource(rootURI + "/A_story");
    index.put("A_story", aResource);
        Resource anotherResource = new Resource(rootURI + "/Another_story");
    index.put("Another_story", anotherResource);
        String includes = "**";
    when(indexer.indexResources(rootURI, sourcePath, sourceSyntax, includes)).thenReturn(index);

        // When
        ResourceExporter exporter = new ExportFromFilesystem(indexer, uploader, sourcePath, sourceExt, sourceSyntax, includes);
        exporter.exportResources(rootURI);

View Full Code Here

        final ResourceLoader loader = mock(ResourceLoader.class);
        String rootURI = "http://wiki";
        Map<String, Resource> index = new HashMap<String, Resource>();
        index.put("one", new Resource(rootURI + "/one"));
        index.put("two", new Resource(rootURI + "/two"));
        when(indexer.indexResources(rootURI)).thenReturn(index);
        String text1 = "story text 1";
        when(loader.loadResourceAsText(index.get("one").getURI())).thenReturn(text1);
        String text2 = "story text 2";
        when(loader.loadResourceAsText(index.get("two").getURI())).thenReturn(text2);
View Full Code Here

  }

  @When("index is retrieved from $uri")
  public void indexIsRetrieved(String uri) {
    ResourceIndexer indexer = resourceIndexer();
    index = indexer.indexResources(uri);
  }

  @Then("the index is not empty")
  public void indexIsNotEmpty() {
    assertThat(index.isEmpty(), is(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.