Package org.jbehave.core.io.rest

Examples of org.jbehave.core.io.rest.ResourceImporter


  public void execute() throws MojoExecutionException, MojoFailureException {
    try {
      getLog().info(
          "Importing to filesystem resources from REST root URI "
              + restRootURI);
      ResourceImporter importer = createImporter();
      importer.importResources(restRootURI);
    } catch (Exception e) {
      String message = "Failed to import to filesystem resources from REST root URI "
          + restRootURI;
      getLog().warn(message);
      throw new MojoExecutionException(message, e);
View Full Code Here


        when(loader.loadResourceAsText(index.get("two").getURI())).thenReturn(text2);

        // When
        String targetPath = "target/stories";
        String targetExt = ".story";
        ResourceImporter importer = new ImportToFilesystem(indexer, loader, targetPath, targetExt);
        importer.importResources(rootURI);

        // Then
        File file1 = new File(targetPath + "/one" + targetExt);
        assertThat(file1.exists(), equalTo(true));
        assertThat(readFileToString(file1), equalTo(text1));
View Full Code Here

TOP

Related Classes of org.jbehave.core.io.rest.ResourceImporter

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.