Class S3ClassExtension.Builder
java.lang.Object
org.sdase.commons.server.s3.testing.S3ClassExtension.Builder
- Enclosing class:
- S3ClassExtension
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
createBucket
(String bucketName) Create a bucket on the S3 service for use during testing.Put a file as an object in the S3 service for use during testing.Put a string as an object in the S3 service for use during testing.putObject
(String bucketName, String key, Supplier<InputStream> inputStreamSupplier) Put an input stream as an object in the S3 service for use during testing.
-
Method Details
-
createBucket
Create a bucket on the S3 service for use during testing.- Parameters:
bucketName
- the name of the bucket- Returns:
- The builder.
-
putObject
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
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(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 bucketkey
- the key to store the file ininputStreamSupplier
- the content to store- Returns:
- The builder
-
build
-