This is an automated email from the ASF dual-hosted git repository. benw pushed a commit to branch javax in repository https://gitbox.apache.org/repos/asf/tapestry-5.git
commit f2cedbd0a149bfe6c1451515b6490844363a229d Author: Ben Weidig <[email protected]> AuthorDate: Sun Apr 5 10:48:51 2026 +0200 tapestry-latest-java-tests: convert testng to junit --- .../ioc/services/Java10And11NewFeatureTests.java | 35 +++++++++------------- .../ioc/services/Java12And13NewFeatureTests.java | 15 +++++----- .../ioc/services/Java14NewFeatureTests.java | 14 ++++----- .../ioc/services/Java15To17NewFeatureTests.java | 14 ++++----- .../ioc/services/Java9NewFeatureTests.java | 15 +++++----- 5 files changed, 44 insertions(+), 49 deletions(-) diff --git a/tapestry-latest-java-tests/src/test/java/org/apache/tapestry5/ioc/services/Java10And11NewFeatureTests.java b/tapestry-latest-java-tests/src/test/java/org/apache/tapestry5/ioc/services/Java10And11NewFeatureTests.java index f91db00cf..aec435086 100644 --- a/tapestry-latest-java-tests/src/test/java/org/apache/tapestry5/ioc/services/Java10And11NewFeatureTests.java +++ b/tapestry-latest-java-tests/src/test/java/org/apache/tapestry5/ioc/services/Java10And11NewFeatureTests.java @@ -11,19 +11,15 @@ // limitations under the License. package org.apache.tapestry5.ioc.services; +import org.apache.tapestry5.ioc.Registry; import org.apache.tapestry5.ioc.RegistryBuilder; import org.apache.tapestry5.ioc.ServiceBinder; -import org.testng.annotations.BeforeSuite; -import org.testng.annotations.Test; +import org.junit.jupiter.api.BeforeAll; -/** - * Tests for Tapestry-IoC and the only Java language feature introduced in Java SE 10 and 11, - * local variable type inference (introduced in 10 and improved in 11). - */ -public class Java10And11NewFeatureTests +public class Java10And11NewFeatureTests { - - public static class Java10And11Module + + public static class Java10And11Module { public static void bind(ServiceBinder binder) { @@ -31,24 +27,21 @@ public class Java10And11NewFeatureTests binder.bind(Java10And11ConcreteService.class); } } - - private Java10And11Service java10And11Service; - - private Java10And11ConcreteService java10And11ConcreteService; - - @BeforeSuite - public void setup() + + private static Java10And11Service java10And11Service; + private static Java10And11ConcreteService java10And11ConcreteService; + + @BeforeAll + static void setup() { - var registry = RegistryBuilder.buildAndStartupRegistry(Java10And11Module.class); + Registry registry = RegistryBuilder.buildAndStartupRegistry(Java10And11Module.class); java10And11Service = registry.getService(Java10And11Service.class); java10And11ConcreteService = registry.getService(Java10And11ConcreteService.class); } - @Test - public void localVariableTypeInference() throws Exception + void localVariableTypeInference() throws Exception { java10And11Service.localVariableTypeInference(); - java10And11ConcreteService.localVariableTypeInference();; + java10And11ConcreteService.localVariableTypeInference(); } - } diff --git a/tapestry-latest-java-tests/src/test/java/org/apache/tapestry5/ioc/services/Java12And13NewFeatureTests.java b/tapestry-latest-java-tests/src/test/java/org/apache/tapestry5/ioc/services/Java12And13NewFeatureTests.java index 051b58615..773e204be 100644 --- a/tapestry-latest-java-tests/src/test/java/org/apache/tapestry5/ioc/services/Java12And13NewFeatureTests.java +++ b/tapestry-latest-java-tests/src/test/java/org/apache/tapestry5/ioc/services/Java12And13NewFeatureTests.java @@ -11,10 +11,11 @@ // limitations under the License. package org.apache.tapestry5.ioc.services; +import org.apache.tapestry5.ioc.Registry; import org.apache.tapestry5.ioc.RegistryBuilder; import org.apache.tapestry5.ioc.ServiceBinder; -import org.testng.annotations.BeforeSuite; -import org.testng.annotations.Test; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; /** * Tests for Tapestry-IoC and the Java language features introduced in Java SE 12 and 13, @@ -32,14 +33,14 @@ public class Java12And13NewFeatureTests } } - private Java12And13Service java12And13Service; + private static Java12And13Service java12And13Service; - private Java12And13ConcreteService java12And13ConcreteService; + private static Java12And13ConcreteService java12And13ConcreteService; - @BeforeSuite - public void setup() + @BeforeAll + public static void setup() { - var registry = RegistryBuilder.buildAndStartupRegistry(Java12And13Module.class); + Registry registry = RegistryBuilder.buildAndStartupRegistry(Java12And13Module.class); java12And13Service = registry.getService(Java12And13Service.class); java12And13ConcreteService = registry.getService(Java12And13ConcreteService.class); } diff --git a/tapestry-latest-java-tests/src/test/java/org/apache/tapestry5/ioc/services/Java14NewFeatureTests.java b/tapestry-latest-java-tests/src/test/java/org/apache/tapestry5/ioc/services/Java14NewFeatureTests.java index 35746c2fb..77cb32561 100644 --- a/tapestry-latest-java-tests/src/test/java/org/apache/tapestry5/ioc/services/Java14NewFeatureTests.java +++ b/tapestry-latest-java-tests/src/test/java/org/apache/tapestry5/ioc/services/Java14NewFeatureTests.java @@ -14,9 +14,9 @@ package org.apache.tapestry5.ioc.services; import org.apache.tapestry5.ioc.Registry; import org.apache.tapestry5.ioc.RegistryBuilder; import org.apache.tapestry5.ioc.ServiceBinder; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; import org.slf4j.LoggerFactory; -import org.testng.annotations.BeforeSuite; -import org.testng.annotations.Test; /** * Tests for Tapestry-IoC and Java language features introduced in Java SE 14: pattern matching for the @@ -25,7 +25,7 @@ import org.testng.annotations.Test; public class Java14NewFeatureTests { - private Registry registry; + private static Registry registry; public static class Java14Module { @@ -40,12 +40,12 @@ public class Java14NewFeatureTests } } - private Java14Service java14Service; + private static Java14Service java14Service; - private Java14ConcreteService java14ConcreteService; + private static Java14ConcreteService java14ConcreteService; - @BeforeSuite - public void setup() + @BeforeAll + public static void setup() { registry = RegistryBuilder.buildAndStartupRegistry(Java14Module.class); java14Service = registry.getService(Java14Service.class); diff --git a/tapestry-latest-java-tests/src/test/java/org/apache/tapestry5/ioc/services/Java15To17NewFeatureTests.java b/tapestry-latest-java-tests/src/test/java/org/apache/tapestry5/ioc/services/Java15To17NewFeatureTests.java index f8fb60dd9..c6db32c19 100644 --- a/tapestry-latest-java-tests/src/test/java/org/apache/tapestry5/ioc/services/Java15To17NewFeatureTests.java +++ b/tapestry-latest-java-tests/src/test/java/org/apache/tapestry5/ioc/services/Java15To17NewFeatureTests.java @@ -16,10 +16,10 @@ import org.apache.tapestry5.ioc.RegistryBuilder; import org.apache.tapestry5.ioc.ServiceBinder; import org.apache.tapestry5.ioc.annotations.Marker; import org.apache.tapestry5.ioc.annotations.Primary; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import org.testng.annotations.BeforeSuite; -import org.testng.annotations.Test; /** * Tests for Tapestry-IoC To the only Java language feature introduced in Java SE 10 To 11, @@ -80,14 +80,14 @@ public class Java15To17NewFeatureTests } - private Java15To17Service java15To17Service; + private static Java15To17Service java15To17Service; - private Java15To17ConcreteService java15To17ConcreteService; + private static Java15To17ConcreteService java15To17ConcreteService; - private Registry registry; + private static Registry registry; - @BeforeSuite - public void setup() + @BeforeAll + public static void setup() { registry = RegistryBuilder.buildAndStartupRegistry(Java15To17Module.class); java15To17Service = registry.getService(Java15To17Service.class); diff --git a/tapestry-latest-java-tests/src/test/java/org/apache/tapestry5/ioc/services/Java9NewFeatureTests.java b/tapestry-latest-java-tests/src/test/java/org/apache/tapestry5/ioc/services/Java9NewFeatureTests.java index f2ddcc690..02d449627 100644 --- a/tapestry-latest-java-tests/src/test/java/org/apache/tapestry5/ioc/services/Java9NewFeatureTests.java +++ b/tapestry-latest-java-tests/src/test/java/org/apache/tapestry5/ioc/services/Java9NewFeatureTests.java @@ -11,10 +11,11 @@ // limitations under the License. package org.apache.tapestry5.ioc.services; +import org.apache.tapestry5.ioc.Registry; import org.apache.tapestry5.ioc.RegistryBuilder; import org.apache.tapestry5.ioc.ServiceBinder; -import org.testng.annotations.BeforeSuite; -import org.testng.annotations.Test; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; /** * Tests for Tapestry-IoC and Java language features introduced in Java SE 9. @@ -31,14 +32,14 @@ public class Java9NewFeatureTests } } - private Java9Service java9Service; + private static Java9Service java9Service; - private Java9ConcreteService java9ConcreteService; + private static Java9ConcreteService java9ConcreteService; - @BeforeSuite - public void setup() + @BeforeAll + public static void setup() { - var registry = RegistryBuilder.buildAndStartupRegistry(Java9Module.class); + Registry registry = RegistryBuilder.buildAndStartupRegistry(Java9Module.class); java9Service = registry.getService(Java9Service.class); java9ConcreteService = registry.getService(Java9ConcreteService.class); }
