diff --git a/modules/test/README.md b/modules/testcore/README.md similarity index 96% rename from modules/test/README.md rename to modules/testcore/README.md index 2ef32f5333..4a0ddac39b 100644 --- a/modules/test/README.md +++ b/modules/testcore/README.md @@ -9,13 +9,14 @@ In the following example, if the logger does not already exist, a default one, t ```java @ExtendWith(LogSupplierExtension.class) class LogTest { - @LogSource (logger="Q2", realm="log-test") + @LogSource(logger = "Q2", realm = "log-test") Log log; - + @Test - public void testDebug(){ + public void testDebug() { log.debug("debug called"); } +} ``` @@ -71,4 +72,4 @@ class MUXSupplierExtensionTest { assertSame(response, mux.request(request, 1000L)); } } -``` \ No newline at end of file +``` diff --git a/modules/test/build.gradle b/modules/testcore/build.gradle similarity index 100% rename from modules/test/build.gradle rename to modules/testcore/build.gradle diff --git a/modules/test/src/main/java/org/jpos/ee/test/LogSource.java b/modules/testcore/src/main/java/org/jpos/ee/test/LogSource.java similarity index 100% rename from modules/test/src/main/java/org/jpos/ee/test/LogSource.java rename to modules/testcore/src/main/java/org/jpos/ee/test/LogSource.java diff --git a/modules/test/src/main/java/org/jpos/ee/test/LogSupplierExtension.java b/modules/testcore/src/main/java/org/jpos/ee/test/LogSupplierExtension.java similarity index 95% rename from modules/test/src/main/java/org/jpos/ee/test/LogSupplierExtension.java rename to modules/testcore/src/main/java/org/jpos/ee/test/LogSupplierExtension.java index fc85cc18e8..afbd5a8cf4 100644 --- a/modules/test/src/main/java/org/jpos/ee/test/LogSupplierExtension.java +++ b/modules/testcore/src/main/java/org/jpos/ee/test/LogSupplierExtension.java @@ -63,14 +63,13 @@ public void beforeEach(ExtensionContext context) throws IllegalArgumentException * * @param parameterContext the context for the parameter for which an argument should * be resolved; never {@code null} - * @param extensionContext the extension context for the {@code Executable} - * about to be invoked; never {@code null} + * @param ignored unused * @return {@code true} if this resolver can resolve an argument for the parameter * @see #resolveParameter * @see ParameterContext */ @Override - public boolean supportsParameter(ParameterContext parameterContext, ExtensionContext extensionContext) throws ParameterResolutionException { + public boolean supportsParameter(ParameterContext parameterContext, ExtensionContext ignored) throws ParameterResolutionException { return parameterContext.isAnnotated(LogSource.class) && parameterContext.getTarget().map(Object::getClass).filter(c -> c.isAssignableFrom(LogSource.class)).isPresent(); } diff --git a/modules/test/src/main/java/org/jpos/ee/test/MUXMock.java b/modules/testcore/src/main/java/org/jpos/ee/test/MUXMock.java similarity index 100% rename from modules/test/src/main/java/org/jpos/ee/test/MUXMock.java rename to modules/testcore/src/main/java/org/jpos/ee/test/MUXMock.java diff --git a/modules/test/src/main/java/org/jpos/ee/test/MUXSupplierExtension.java b/modules/testcore/src/main/java/org/jpos/ee/test/MUXSupplierExtension.java similarity index 98% rename from modules/test/src/main/java/org/jpos/ee/test/MUXSupplierExtension.java rename to modules/testcore/src/main/java/org/jpos/ee/test/MUXSupplierExtension.java index 4a1f92b319..a857f69124 100644 --- a/modules/test/src/main/java/org/jpos/ee/test/MUXSupplierExtension.java +++ b/modules/testcore/src/main/java/org/jpos/ee/test/MUXSupplierExtension.java @@ -55,7 +55,7 @@ protected void setUp(ExtensionContext context, boolean beforeAll) { * @param afterAll if this is for an afterAll method unregister only static muxes otherwise only instences. */ protected void tearDown(ExtensionContext context, boolean afterAll){ - runOnFields(context, afterAll, (f, annotation) -> NameRegistrar.unregister("mux." + annotation.name())); + runOnFields(context, afterAll, (ignored, annotation) -> NameRegistrar.unregister("mux." + annotation.name())); } /** diff --git a/modules/test/src/main/java/org/jpos/ee/test/TestUtil.java b/modules/testcore/src/main/java/org/jpos/ee/test/TestUtil.java similarity index 100% rename from modules/test/src/main/java/org/jpos/ee/test/TestUtil.java rename to modules/testcore/src/main/java/org/jpos/ee/test/TestUtil.java diff --git a/modules/test/src/test/java/org/jpos/ee/test/LogSupplierExtensionTest.java b/modules/testcore/src/test/java/org/jpos/ee/test/LogSupplierExtensionTest.java similarity index 100% rename from modules/test/src/test/java/org/jpos/ee/test/LogSupplierExtensionTest.java rename to modules/testcore/src/test/java/org/jpos/ee/test/LogSupplierExtensionTest.java diff --git a/modules/test/src/test/java/org/jpos/ee/test/MUXSupplierExtensionTest.java b/modules/testcore/src/test/java/org/jpos/ee/test/MUXSupplierExtensionTest.java similarity index 100% rename from modules/test/src/test/java/org/jpos/ee/test/MUXSupplierExtensionTest.java rename to modules/testcore/src/test/java/org/jpos/ee/test/MUXSupplierExtensionTest.java diff --git a/settings.gradle b/settings.gradle index 89e7e49855..2a70dbda42 100644 --- a/settings.gradle +++ b/settings.gradle @@ -46,8 +46,8 @@ include ':modules:core', ':modules:seqno', ':modules:db-flyway', ':modules:elasticsearch', - ':modules:bom' - ':modules:test' + ':modules:bom', + ':modules:testcore' rootProject.name = 'jposee'