Class S3ClassExtension
- java.lang.Object
-
- org.sdase.commons.server.s3.testing.S3Mock
-
- org.sdase.commons.server.s3.testing.S3ClassExtension
-
- All Implemented Interfaces:
org.junit.jupiter.api.extension.AfterAllCallback
,org.junit.jupiter.api.extension.BeforeAllCallback
,org.junit.jupiter.api.extension.Extension
public class S3ClassExtension extends S3Mock implements org.junit.jupiter.api.extension.BeforeAllCallback, org.junit.jupiter.api.extension.AfterAllCallback
JUnit 5 extension for running a AWS S3-compatible object storage alongside the (integration) tests. UseS3Mock.getEndpoint()
to retrieve the endpoint URL to connect to.Example usage:
@RegisterExtension static final S3ClassExtension S3_EXTENSION = S3ClassExtension.builder().build();
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
S3ClassExtension.Builder
-
Constructor Summary
Constructors Constructor Description S3ClassExtension(java.util.List<java.lang.String> buckets, java.util.List<MockObject> mockObjects)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
afterAll(org.junit.jupiter.api.extension.ExtensionContext context)
void
beforeAll(org.junit.jupiter.api.extension.ExtensionContext context)
static S3ClassExtension.Builder
builder()
void
start()
void
stop()
-
-
-
Constructor Detail
-
S3ClassExtension
public S3ClassExtension(java.util.List<java.lang.String> buckets, java.util.List<MockObject> mockObjects)
-
-
Method Detail
-
beforeAll
public void beforeAll(org.junit.jupiter.api.extension.ExtensionContext context)
- Specified by:
beforeAll
in interfaceorg.junit.jupiter.api.extension.BeforeAllCallback
-
afterAll
public void afterAll(org.junit.jupiter.api.extension.ExtensionContext context)
- Specified by:
afterAll
in interfaceorg.junit.jupiter.api.extension.AfterAllCallback
-
builder
public static S3ClassExtension.Builder builder()
-
-