diff --git a/examples/maven/deepl-test-app/pom.xml b/examples/maven/deepl-test-app/pom.xml index 1c3187e..deb70e1 100644 --- a/examples/maven/deepl-test-app/pom.xml +++ b/examples/maven/deepl-test-app/pom.xml @@ -15,9 +15,9 @@ - junit - junit - 4.13.2 + org.junit.jupiter + junit-jupiter + 5.10.0 test @@ -34,12 +34,13 @@ - org.apache.maven.plugins - maven-surefire-plugin - 3.1.2 - - com.deepl.deepltestapp.annotation.IntegrationTest - + maven-surefire-plugin + 3.1.2 + + + **/*IntegrationTest.java + + @@ -47,23 +48,17 @@ runIntegrationTests - - - maven-surefire-plugin - 3.1.2 - - - integration-test - - - **/* - - com.deepl.deepltestapp.annotation.IntegrationTest - - - - - + + + maven-surefire-plugin + 3.1.2 + + + integration-test + + + + diff --git a/examples/maven/deepl-test-app/src/main/java/com/deepl/deepltestapp/annotation/IntegrationTest.java b/examples/maven/deepl-test-app/src/main/java/com/deepl/deepltestapp/annotation/IntegrationTest.java deleted file mode 100644 index a86fdcd..0000000 --- a/examples/maven/deepl-test-app/src/main/java/com/deepl/deepltestapp/annotation/IntegrationTest.java +++ /dev/null @@ -1,9 +0,0 @@ -// Copyright 2023 DeepL SE (https://www.deepl.com) -// Use of this source code is governed by an MIT -// license that can be found in the LICENSE file. -package com.deepl.deepltestapp.annotation; - -/** - * Marks tests as Integration tests, used for DeepLs internal CI pipeline. - */ -public interface IntegrationTest {} diff --git a/examples/maven/deepl-test-app/src/test/java/com/deepl/deepltestapp/DeepLIntegrationTest.java b/examples/maven/deepl-test-app/src/test/java/com/deepl/deepltestapp/DeepLIntegrationTest.java index 9a09bba..818d5a0 100644 --- a/examples/maven/deepl-test-app/src/test/java/com/deepl/deepltestapp/DeepLIntegrationTest.java +++ b/examples/maven/deepl-test-app/src/test/java/com/deepl/deepltestapp/DeepLIntegrationTest.java @@ -4,37 +4,26 @@ package com.deepl.deepltestapp; import com.deepl.api.*; -import com.deepl.deepltestapp.*; -import com.deepl.deepltestapp.annotation.IntegrationTest; -import junit.framework.Test; -import junit.framework.TestCase; -import junit.framework.TestSuite; -import org.junit.Assert.*; -import org.junit.experimental.categories.Category; +import org.junit.jupiter.api.Test; + +import static org.junit.jupiter.api.Assertions.assertFalse; /** * Internal DeepL Integration Test */ -@Category(IntegrationTest.class) -public class DeepLIntegrationTest extends TestCase { - public DeepLIntegrationTest(String testName) { - super(testName); - } - - public static Test suite() { - return new TestSuite(DeepLIntegrationTest.class); - } +public class DeepLIntegrationTest { /** * Runs the hello world example. Requires a DeepL auth key via the DEEPL_AUTH_KEY * environment variable. */ - public void testApp() throws InterruptedException, DeepLException { + @Test + void testApp() throws InterruptedException, DeepLException { String result = App.translateHelloWorld(); String[] wordsToCheck = {"Hello", "World"}; for (String wordToCheck : wordsToCheck) { - assertFalse(String.format("Expected translation to no longer contain the english %s, received %s", - wordToCheck, result), result.contains(wordToCheck) + assertFalse(result.contains(wordToCheck), + String.format("Expected translation to no longer contain the english %s, received %s", wordToCheck, result) ); } }