Package com.adobe.testing.s3mock.junit4
Class S3MockRule
java.lang.Object
com.adobe.testing.s3mock.testsupport.common.S3MockStarter
com.adobe.testing.s3mock.junit4.S3MockRule
- All Implemented Interfaces:
org.junit.rules.TestRule
JUnit rule to start and stop the S3Mock Application. After the tests, the S3Mock is stopped. It
should be used as
ClassRule
:
@ClassRule public static S3MockRule S3_MOCK_RULE = S3MockRule.builder().build(); private final AmazonS3 s3Client = S3_MOCK_RULE.createS3Client(); @Test public void doSomethingWithS3() { s3Client.createBucket("myBucket"); }
-
Nested Class Summary
Nested classes/interfaces inherited from class com.adobe.testing.s3mock.testsupport.common.S3MockStarter
S3MockStarter.BaseBuilder<T extends S3MockStarter>
-
Field Summary
Fields inherited from class com.adobe.testing.s3mock.testsupport.common.S3MockStarter
properties, s3MockFileStore
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionorg.junit.runners.model.Statement
apply
(org.junit.runners.model.Statement base, org.junit.runner.Description description) static S3MockRule.Builder
builder()
Methods inherited from class com.adobe.testing.s3mock.testsupport.common.S3MockStarter
configureClientToIgnoreInvalidSslCertificates, createS3Client, createS3Client, createS3ClientV2, defaultProps, getEndpointConfiguration, getHttpPort, getPort, getServiceEndpoint, registerKMSKeyRef, start, stop
-
Constructor Details
-
S3MockRule
public S3MockRule()Creates an instance with the default configuration.
-
-
Method Details
-
builder
-
apply
public org.junit.runners.model.Statement apply(org.junit.runners.model.Statement base, org.junit.runner.Description description) - Specified by:
apply
in interfaceorg.junit.rules.TestRule
-