diff --git a/src/main/java/org/jboss/arquillian/testcontainers/ContainerInjectionTestEnricher.java b/src/main/java/org/jboss/arquillian/testcontainers/ContainerInjectionTestEnricher.java index 0a36343..08ed08d 100644 --- a/src/main/java/org/jboss/arquillian/testcontainers/ContainerInjectionTestEnricher.java +++ b/src/main/java/org/jboss/arquillian/testcontainers/ContainerInjectionTestEnricher.java @@ -17,7 +17,7 @@ import org.jboss.arquillian.core.api.Instance; import org.jboss.arquillian.core.api.annotation.Inject; import org.jboss.arquillian.test.spi.TestEnricher; -import org.jboss.arquillian.testcontainers.api.DockerRequired; +import org.jboss.arquillian.testcontainers.api.ContainerRequired; import org.jboss.arquillian.testcontainers.api.Testcontainer; import org.testcontainers.containers.GenericContainer; @@ -33,7 +33,7 @@ public class ContainerInjectionTestEnricher implements TestEnricher { @Override public void enrich(final Object testCase) { - if (!isAnnotatedWith(testCase.getClass(), DockerRequired.class)) { + if (!isAnnotatedWith(testCase.getClass(), ContainerRequired.class)) { return; } for (Field field : getFieldsWithAnnotation(testCase.getClass())) { diff --git a/src/main/java/org/jboss/arquillian/testcontainers/TestContainersObserver.java b/src/main/java/org/jboss/arquillian/testcontainers/TestContainersObserver.java index dcc2517..9680479 100644 --- a/src/main/java/org/jboss/arquillian/testcontainers/TestContainersObserver.java +++ b/src/main/java/org/jboss/arquillian/testcontainers/TestContainersObserver.java @@ -17,7 +17,7 @@ import org.jboss.arquillian.test.spi.event.enrichment.AfterEnrichment; import org.jboss.arquillian.test.spi.event.suite.AfterClass; import org.jboss.arquillian.test.spi.event.suite.BeforeClass; -import org.jboss.arquillian.testcontainers.api.DockerRequired; +import org.jboss.arquillian.testcontainers.api.ContainerRequired; import org.testcontainers.DockerClientFactory; @SuppressWarnings("unused") @@ -30,7 +30,7 @@ class TestContainersObserver { private Instance registry; /** - * This first checks if the {@link DockerRequired} annotation is present on the test class failing if necessary. It + * This first checks if the {@link ContainerRequired} annotation is present on the test class failing if necessary. It * then creates the {@link TestcontainerRegistry} and stores it in a {@link ClassScoped} instance. * * @param beforeClass the before class event @@ -39,7 +39,7 @@ class TestContainersObserver { */ public void createContainer(@Observes(precedence = 500) BeforeClass beforeClass) throws Throwable { final TestClass javaClass = beforeClass.getTestClass(); - final DockerRequired dockerRequired = javaClass.getAnnotation(DockerRequired.class); + final ContainerRequired dockerRequired = javaClass.getAnnotation(ContainerRequired.class); if (dockerRequired != null) { if (!isDockerAvailable()) { throw createException(dockerRequired.value()); diff --git a/src/main/java/org/jboss/arquillian/testcontainers/api/DockerRequired.java b/src/main/java/org/jboss/arquillian/testcontainers/api/ContainerRequired.java similarity index 81% rename from src/main/java/org/jboss/arquillian/testcontainers/api/DockerRequired.java rename to src/main/java/org/jboss/arquillian/testcontainers/api/ContainerRequired.java index 614a71f..814603b 100644 --- a/src/main/java/org/jboss/arquillian/testcontainers/api/DockerRequired.java +++ b/src/main/java/org/jboss/arquillian/testcontainers/api/ContainerRequired.java @@ -12,7 +12,7 @@ import java.lang.annotation.Target; /** - * An annotation which will check if docker is available and if not throw an exception. By default, this will throw an + * An annotation which will check if container engine is available and if not throw an exception. By default, this will throw an * {@link AssertionError}. However, you can define the type of exception to throw. The exception must * have a string or no-arg constructor. * @@ -24,7 +24,7 @@ @Documented @Retention(RetentionPolicy.RUNTIME) @Target({ ElementType.TYPE }) -public @interface DockerRequired { +public @interface ContainerRequired { /** * The type of the exception to throw. The exception must have a public string constructor. @@ -33,7 +33,7 @@ * {@code TestAbortedException} to act as an Assumption error. *

* - * @return the exception type to throw if docker is not available + * @return the exception type to throw if container engine is not available */ Class value() default AssertionError.class; } diff --git a/src/main/java/org/jboss/arquillian/testcontainers/api/Testcontainer.java b/src/main/java/org/jboss/arquillian/testcontainers/api/Testcontainer.java index cf6083c..1deee88 100644 --- a/src/main/java/org/jboss/arquillian/testcontainers/api/Testcontainer.java +++ b/src/main/java/org/jboss/arquillian/testcontainers/api/Testcontainer.java @@ -16,12 +16,12 @@ /** * Used to annotate a field which must be an instance of a {@link GenericContainer}. A - * {@link DockerRequired} annotation must be present on the type to use Testcontainer injection. + * {@link ContainerRequired} annotation must be present on the type to use Testcontainer injection. * *
  * @ExtendWith(ArquillianExtension.class)
  * @RunAsClient
- * // By throwing the TestAbortedException, the test will be skipped if docker is not available
+ * // By throwing the TestAbortedException, the test will be skipped if a container engine is not available
  * @DockerRequired(TestAbortedException.class)
  * public class ContainerTest {
  *
diff --git a/src/test/java/org/jboss/arquillian/testcontainers/test/ManualContainerTest.java b/src/test/java/org/jboss/arquillian/testcontainers/test/ManualContainerTest.java
index e6fd699..f2e99ec 100644
--- a/src/test/java/org/jboss/arquillian/testcontainers/test/ManualContainerTest.java
+++ b/src/test/java/org/jboss/arquillian/testcontainers/test/ManualContainerTest.java
@@ -8,7 +8,7 @@
 import org.jboss.arquillian.container.test.api.Deployment;
 import org.jboss.arquillian.container.test.api.RunAsClient;
 import org.jboss.arquillian.junit5.ArquillianExtension;
-import org.jboss.arquillian.testcontainers.api.DockerRequired;
+import org.jboss.arquillian.testcontainers.api.ContainerRequired;
 import org.jboss.arquillian.testcontainers.api.Testcontainer;
 import org.jboss.arquillian.testcontainers.test.common.SimpleTestContainer;
 import org.jboss.shrinkwrap.api.ShrinkWrap;
@@ -27,7 +27,7 @@
  * @author James R. Perkins
  */
 @ExtendWith(ArquillianExtension.class)
-@DockerRequired(TestAbortedException.class)
+@ContainerRequired(TestAbortedException.class)
 @RunAsClient
 @TestMethodOrder(MethodOrderer.OrderAnnotation.class)
 public class ManualContainerTest {
diff --git a/src/test/java/org/jboss/arquillian/testcontainers/test/MultipleContainerTest.java b/src/test/java/org/jboss/arquillian/testcontainers/test/MultipleContainerTest.java
index 6d69aa3..51dc69e 100644
--- a/src/test/java/org/jboss/arquillian/testcontainers/test/MultipleContainerTest.java
+++ b/src/test/java/org/jboss/arquillian/testcontainers/test/MultipleContainerTest.java
@@ -8,7 +8,7 @@
 import org.jboss.arquillian.container.test.api.Deployment;
 import org.jboss.arquillian.container.test.api.RunAsClient;
 import org.jboss.arquillian.junit5.ArquillianExtension;
-import org.jboss.arquillian.testcontainers.api.DockerRequired;
+import org.jboss.arquillian.testcontainers.api.ContainerRequired;
 import org.jboss.arquillian.testcontainers.api.Testcontainer;
 import org.jboss.arquillian.testcontainers.test.common.SimpleTestContainer;
 import org.jboss.arquillian.testcontainers.test.common.WildFlyContainer;
@@ -24,7 +24,7 @@
  * @author James R. Perkins
  */
 @ExtendWith(ArquillianExtension.class)
-@DockerRequired(TestAbortedException.class)
+@ContainerRequired(TestAbortedException.class)
 @RunAsClient
 public class MultipleContainerTest {
 
diff --git a/src/test/java/org/jboss/arquillian/testcontainers/test/SameInstanceTest.java b/src/test/java/org/jboss/arquillian/testcontainers/test/SameInstanceTest.java
index 440f4a6..46a1f31 100644
--- a/src/test/java/org/jboss/arquillian/testcontainers/test/SameInstanceTest.java
+++ b/src/test/java/org/jboss/arquillian/testcontainers/test/SameInstanceTest.java
@@ -8,7 +8,7 @@
 import org.jboss.arquillian.container.test.api.Deployment;
 import org.jboss.arquillian.container.test.api.RunAsClient;
 import org.jboss.arquillian.junit5.ArquillianExtension;
-import org.jboss.arquillian.testcontainers.api.DockerRequired;
+import org.jboss.arquillian.testcontainers.api.ContainerRequired;
 import org.jboss.arquillian.testcontainers.api.Testcontainer;
 import org.jboss.arquillian.testcontainers.test.common.SimpleTestContainer;
 import org.jboss.shrinkwrap.api.ShrinkWrap;
@@ -29,7 +29,7 @@
  */
 @ExtendWith(ArquillianExtension.class)
 @RunAsClient
-@DockerRequired(TestAbortedException.class)
+@ContainerRequired(TestAbortedException.class)
 public class SameInstanceTest {
 
     @Testcontainer
diff --git a/src/test/java/org/jboss/arquillian/testcontainers/test/SanityTest.java b/src/test/java/org/jboss/arquillian/testcontainers/test/SanityTest.java
index f68793e..b473fbb 100644
--- a/src/test/java/org/jboss/arquillian/testcontainers/test/SanityTest.java
+++ b/src/test/java/org/jboss/arquillian/testcontainers/test/SanityTest.java
@@ -8,7 +8,7 @@
 import org.jboss.arquillian.container.test.api.Deployment;
 import org.jboss.arquillian.container.test.api.RunAsClient;
 import org.jboss.arquillian.junit5.ArquillianExtension;
-import org.jboss.arquillian.testcontainers.api.DockerRequired;
+import org.jboss.arquillian.testcontainers.api.ContainerRequired;
 import org.jboss.arquillian.testcontainers.api.Testcontainer;
 import org.jboss.arquillian.testcontainers.test.common.SimpleTestContainer;
 import org.jboss.shrinkwrap.api.ShrinkWrap;
@@ -24,7 +24,7 @@
  */
 @ExtendWith(ArquillianExtension.class)
 @RunAsClient
-@DockerRequired(TestAbortedException.class)
+@ContainerRequired(TestAbortedException.class)
 public class SanityTest {
 
     @Testcontainer
diff --git a/src/test/java/org/jboss/arquillian/testcontainers/test/TypeSpecifiedInjectionTest.java b/src/test/java/org/jboss/arquillian/testcontainers/test/TypeSpecifiedInjectionTest.java
index efab38f..e1591b8 100644
--- a/src/test/java/org/jboss/arquillian/testcontainers/test/TypeSpecifiedInjectionTest.java
+++ b/src/test/java/org/jboss/arquillian/testcontainers/test/TypeSpecifiedInjectionTest.java
@@ -8,7 +8,7 @@
 import org.jboss.arquillian.container.test.api.Deployment;
 import org.jboss.arquillian.container.test.api.RunAsClient;
 import org.jboss.arquillian.junit5.ArquillianExtension;
-import org.jboss.arquillian.testcontainers.api.DockerRequired;
+import org.jboss.arquillian.testcontainers.api.ContainerRequired;
 import org.jboss.arquillian.testcontainers.api.Testcontainer;
 import org.jboss.arquillian.testcontainers.test.common.SimpleTestContainer;
 import org.jboss.arquillian.testcontainers.test.common.WildFlyContainer;
@@ -26,7 +26,7 @@
  */
 @ExtendWith(ArquillianExtension.class)
 @RunAsClient
-@DockerRequired(TestAbortedException.class)
+@ContainerRequired(TestAbortedException.class)
 public class TypeSpecifiedInjectionTest {
 
     @Deployment