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
@Deprecated(since="3.0.0",
forRemoval=true)
public class S3MockRule
extends S3MockStarter
implements org.junit.rules.TestRule
Deprecated, for removal: This API element is subject to removal in a future version.
JUnit 5 was released years ago. Please migrate your JUnit 4 tests to JUnit 5.
This TestRule will be removed in S3Mock 4.x
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
Modifier and TypeClassDescriptionstatic class
Deprecated, for removal: This API element is subject to removal in a future version.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
ConstructorDescriptionDeprecated, for removal: This API element is subject to removal in a future version.Creates an instance with the default configuration. -
Method Summary
Modifier and TypeMethodDescriptionorg.junit.runners.model.Statement
apply
(org.junit.runners.model.Statement base, org.junit.runner.Description description) Deprecated, for removal: This API element is subject to removal in a future version.static S3MockRule.Builder
builder()
Deprecated, for removal: This API element is subject to removal in a future version.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()Deprecated, for removal: This API element is subject to removal in a future version.Creates an instance with the default configuration.
-
-
Method Details
-
builder
Deprecated, for removal: This API element is subject to removal in a future version. -
apply
public org.junit.runners.model.Statement apply(org.junit.runners.model.Statement base, org.junit.runner.Description description) Deprecated, for removal: This API element is subject to removal in a future version.- Specified by:
apply
in interfaceorg.junit.rules.TestRule
-