Package com.foreach.cuke.core.util

Examples of com.foreach.cuke.core.util.FileResource


      }
    }
  }

  private String determineFile( String fileToUpload ) {
    FileResource resource = fileResourceResolver.resolve( fileToUpload );
    return resource.getAbsolutePath();
  }
View Full Code Here


              uri.queryParam( name, value );
              break;
          }
        }
        else if ( StringUtils.equalsIgnoreCase( type, "resource" ) ) {
          final FileResource fileResource = fileResourceResolver.resolve( value );
          switch ( httpMethod ) {
            case POST:
            case PUT:
              values.add( name, new ByteArrayResource( fileResource.getContent() )
              {
                @Override
                public String getFilename() {
                  return fileResource.getFileName();
                }
              } );
              break;
            default:
              fail( "Parameter type resource is only usable with POST and PUT" );
View Full Code Here

TOP

Related Classes of com.foreach.cuke.core.util.FileResource

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.