diff --git a/junit-common/src/test/java/eu/coldrye/junit/util/Fixtures.java b/junit-common/src/test/java/eu/coldrye/junit/util/Fixtures.java index 085b221..5a0516e 100644 --- a/junit-common/src/test/java/eu/coldrye/junit/util/Fixtures.java +++ b/junit-common/src/test/java/eu/coldrye/junit/util/Fixtures.java @@ -22,12 +22,16 @@ import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; -public interface Fixtures { +public class Fixtures { + + private Fixtures() { + + } @Target({ElementType.ANNOTATION_TYPE, ElementType.TYPE, ElementType.FIELD, ElementType.PARAMETER}) @Retention(RetentionPolicy.RUNTIME) @Documented - @interface Provided { + public @interface Provided { } @@ -35,7 +39,7 @@ public interface Fixtures { @Target({ElementType.TYPE, ElementType.FIELD, ElementType.PARAMETER}) @Retention(RetentionPolicy.RUNTIME) @Documented - @interface CustomProvided { + public @interface CustomProvided { } @@ -43,28 +47,28 @@ public interface Fixtures { @Target({ElementType.TYPE, ElementType.FIELD, ElementType.PARAMETER}) @Retention(RetentionPolicy.RUNTIME) @Documented - @interface CustomProvided2 { + public @interface CustomProvided2 { } - class Custom1 { + @CustomProvided + public interface Iface1 { } - class Custom2 { + public interface DerivedIface extends Iface1 { } - @CustomProvided - interface Iface1 { + public static class Custom1 { } - interface DerivedIface extends Iface1 { + public static class Custom2 { } - abstract class TestCaseBase { + public static abstract class TestCaseBase { @CustomProvided Custom1 custom1; @@ -78,12 +82,12 @@ public void setCustom2(@CustomProvided Custom2 custom2) { } @Provided - class FirstTestCase implements DerivedIface { + public static class FirstTestCase implements DerivedIface { } @CustomProvided - class SecondTestCase extends TestCaseBase { + public static class SecondTestCase extends TestCaseBase { @Provided Custom1 custom; @@ -94,8 +98,7 @@ public void setCustom1(@CustomProvided Custom1 custom) { } } - class ThirdTestCase { + public static class ThirdTestCase { } - } diff --git a/junit-env-extension/src/main/java/eu/coldrye/junit/env/ParameterResolverImpl.java b/junit-env-extension/src/main/java/eu/coldrye/junit/env/DefaultParameterResolver.java similarity index 96% rename from junit-env-extension/src/main/java/eu/coldrye/junit/env/ParameterResolverImpl.java rename to junit-env-extension/src/main/java/eu/coldrye/junit/env/DefaultParameterResolver.java index 87249b2..58662af 100644 --- a/junit-env-extension/src/main/java/eu/coldrye/junit/env/ParameterResolverImpl.java +++ b/junit-env-extension/src/main/java/eu/coldrye/junit/env/DefaultParameterResolver.java @@ -26,13 +26,13 @@ import java.util.List; /** - * The final class ParameterResolverImpl models a resolver for parameters. + * The final class DefaultParameterResolver models a resolver for parameters. *
* It does so by querying available {@link EnvProvider}S. * * @since 1.0.0 */ -class ParameterResolverImpl { +class DefaultParameterResolver { /** * @param parameterContext diff --git a/junit-env-extension/src/main/java/eu/coldrye/junit/env/TestExecutionListenerImpl.java b/junit-env-extension/src/main/java/eu/coldrye/junit/env/DefaultTestExecutionListener.java similarity index 84% rename from junit-env-extension/src/main/java/eu/coldrye/junit/env/TestExecutionListenerImpl.java rename to junit-env-extension/src/main/java/eu/coldrye/junit/env/DefaultTestExecutionListener.java index 26f7e4d..693570d 100644 --- a/junit-env-extension/src/main/java/eu/coldrye/junit/env/TestExecutionListenerImpl.java +++ b/junit-env-extension/src/main/java/eu/coldrye/junit/env/DefaultTestExecutionListener.java @@ -21,16 +21,16 @@ import org.junit.platform.launcher.TestPlan; /** - * The final class TestExecutionListenerImpl provides a means to be able to shut down + * The final class DefaultTestExecutionListener provides a means to be able to shut down * existing environments after that all tests have been run. *
* It gets registered via {@code META-INF/services/org.junit.platform.launcher.TestExecutionListener}. *
- * This class is internal and must not be used directly.
+ * NOTE: This class is internal and must not be used directly.
*
* @since 1.0.0
*/
-public final class TestExecutionListenerImpl implements TestExecutionListener {
+public final class DefaultTestExecutionListener implements TestExecutionListener {
@Override
public void testPlanExecutionFinished(TestPlan testPlan) {
diff --git a/junit-env-extension/src/main/java/eu/coldrye/junit/env/EnvExtension.java b/junit-env-extension/src/main/java/eu/coldrye/junit/env/EnvExtension.java
index d370928..ae94260 100644
--- a/junit-env-extension/src/main/java/eu/coldrye/junit/env/EnvExtension.java
+++ b/junit-env-extension/src/main/java/eu/coldrye/junit/env/EnvExtension.java
@@ -40,7 +40,7 @@ public final class EnvExtension implements TestInstancePostProcessor, ParameterR
private final FieldInjector fieldInjector;
- private final ParameterResolverImpl parameterResolver;
+ private final DefaultParameterResolver parameterResolver;
/**
* Default constructor
@@ -48,7 +48,7 @@ public final class EnvExtension implements TestInstancePostProcessor, ParameterR
//NOSONAR
public EnvExtension() {
- this(EnvProviderManager.getInstance(), new FieldInjector(), new ParameterResolverImpl());
+ this(EnvProviderManager.getInstance(), new FieldInjector(), new DefaultParameterResolver());
}
/**
@@ -58,7 +58,7 @@ public EnvExtension() {
*/
// For testing only
EnvExtension(EnvProviderManager providerManager, FieldInjector fieldInjector,
- ParameterResolverImpl parameterResolver) {
+ DefaultParameterResolver parameterResolver) {
Preconditions.notNull(providerManager, "providerManager must not be null");
Preconditions.notNull(fieldInjector, "fieldInjector must not be null");
diff --git a/junit-env-extension/src/main/java/eu/coldrye/junit/env/EnvProviderManager.java b/junit-env-extension/src/main/java/eu/coldrye/junit/env/EnvProviderManager.java
index 3fdda48..f1a2b46 100644
--- a/junit-env-extension/src/main/java/eu/coldrye/junit/env/EnvProviderManager.java
+++ b/junit-env-extension/src/main/java/eu/coldrye/junit/env/EnvProviderManager.java
@@ -76,7 +76,7 @@ static synchronized EnvProviderManager getInstance() {
}
/**
- * Destroys the instance. Called by {@link TestExecutionListenerImpl#testPlanExecutionFinished(TestPlan)} at the end
+ * Destroys the instance. Called by {@link DefaultTestExecutionListener#testPlanExecutionFinished(TestPlan)} at the end
* of the test execution.
*/
static void destroyInstance() {
diff --git a/junit-env-extension/src/main/resources/META-INF/services/org.junit.platform.launcher.TestExecutionListener b/junit-env-extension/src/main/resources/META-INF/services/org.junit.platform.launcher.TestExecutionListener
index 2fb3b42..817995a 100644
--- a/junit-env-extension/src/main/resources/META-INF/services/org.junit.platform.launcher.TestExecutionListener
+++ b/junit-env-extension/src/main/resources/META-INF/services/org.junit.platform.launcher.TestExecutionListener
@@ -1 +1 @@
-eu.coldrye.junit.env.TestExecutionListenerImpl
+eu.coldrye.junit.env.DefaultTestExecutionListener
diff --git a/junit-env-extension/src/test/java/eu/coldrye/junit/env/ParameterResolverImplTest.java b/junit-env-extension/src/test/java/eu/coldrye/junit/env/DefaultParameterResolverTest.java
similarity index 97%
rename from junit-env-extension/src/test/java/eu/coldrye/junit/env/ParameterResolverImplTest.java
rename to junit-env-extension/src/test/java/eu/coldrye/junit/env/DefaultParameterResolverTest.java
index 9b1a71b..6bdd163 100644
--- a/junit-env-extension/src/test/java/eu/coldrye/junit/env/ParameterResolverImplTest.java
+++ b/junit-env-extension/src/test/java/eu/coldrye/junit/env/DefaultParameterResolverTest.java
@@ -33,16 +33,16 @@
import java.util.Arrays;
import java.util.List;
-public class ParameterResolverImplTest {
+public class DefaultParameterResolverTest {
- private ParameterResolverImpl sut;
+ private DefaultParameterResolver sut;
private List