Class S3ClassExtension.Builder

  • Enclosing class:
    S3ClassExtension

    public static final class S3ClassExtension.Builder
    extends java.lang.Object
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      S3ClassExtension build()  
      S3ClassExtension.Builder createBucket​(java.lang.String bucketName)
      Create a bucket on the S3 service for use during testing.
      S3ClassExtension.Builder putObject​(java.lang.String bucketName, java.lang.String key, java.io.File file)
      Put a file as an object in the S3 service for use during testing.
      S3ClassExtension.Builder putObject​(java.lang.String bucketName, java.lang.String key, java.io.InputStream stream)
      Put an input stream as an object in the S3 service for use during testing.
      S3ClassExtension.Builder putObject​(java.lang.String bucketName, java.lang.String key, java.lang.String content)
      Put a string as an object in the S3 service for use during testing.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • createBucket

        public S3ClassExtension.Builder createBucket​(java.lang.String bucketName)
        Create a bucket on the S3 service for use during testing.
        Parameters:
        bucketName - the name of the bucket
        Returns:
        The builder.
      • putObject

        public S3ClassExtension.Builder putObject​(java.lang.String bucketName,
                                                  java.lang.String key,
                                                  java.io.File file)
        Put a file as an object in the S3 service for use during testing. Automatically creates a bucket.
        Parameters:
        bucketName - the name of the bucket
        key - the key to store the file in
        file - the content to store as file
        Returns:
        The builder.
      • putObject

        public S3ClassExtension.Builder putObject​(java.lang.String bucketName,
                                                  java.lang.String key,
                                                  java.lang.String content)
        Put a string as an object in the S3 service for use during testing. Automatically creates a bucket.
        Parameters:
        bucketName - the name of the bucket
        key - the key to store the file in
        content - the content to store as string
        Returns:
        The builder.
      • putObject

        public S3ClassExtension.Builder putObject​(java.lang.String bucketName,
                                                  java.lang.String key,
                                                  java.io.InputStream stream)
        Put an input stream as an object in the S3 service for use during testing. Automatically creates a bucket.
        Parameters:
        bucketName - the name of the bucket
        key - the key to store the file in
        stream - the content to store as stream
        Returns:
        The builder