Class S3ClassExtension.Builder

java.lang.Object
org.sdase.commons.server.s3.testing.S3ClassExtension.Builder
Enclosing class:
S3ClassExtension

public static final class S3ClassExtension.Builder extends Object
  • Method Details

    • createBucket

      public S3ClassExtension.Builder createBucket(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(String bucketName, String key, 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(String bucketName, String key, 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(String bucketName, String key, Supplier<InputStream> inputStreamSupplier)
      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
      inputStreamSupplier - the content to store
      Returns:
      The builder
    • build

      public S3ClassExtension build()