Class S3ClassExtension.Builder
- java.lang.Object
-
- org.sdase.commons.server.s3.testing.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.
-
-
-
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 bucketkey
- the key to store the file infile
- 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 bucketkey
- the key to store the file incontent
- 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 bucketkey
- the key to store the file instream
- the content to store as stream- Returns:
- The builder
-
build
public S3ClassExtension build()
-
-