Skip to content

Commit

Permalink
Fix incorrect JUnit dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
stuartwdouglas committed Feb 1, 2021
1 parent 713698f commit da12df2
Show file tree
Hide file tree
Showing 10 changed files with 22 additions and 44 deletions.
5 changes: 0 additions & 5 deletions extensions/keycloak-admin-client/runtime/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,6 @@
<groupId>org.jboss.logging</groupId>
<artifactId>commons-logging-jboss-logging</artifactId>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<scope>test</scope>
</dependency>
</dependencies>

<build>
Expand Down
5 changes: 0 additions & 5 deletions extensions/keycloak-authorization/runtime/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,6 @@
<groupId>org.jboss.logging</groupId>
<artifactId>commons-logging-jboss-logging</artifactId>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<scope>test</scope>
</dependency>
</dependencies>

<build>
Expand Down
4 changes: 0 additions & 4 deletions integration-tests/maven/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,6 @@
<version>${project.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-junit5-internal</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
import org.apache.maven.shared.invoker.InvokerLogger;
import org.apache.maven.shared.invoker.MavenInvocationException;
import org.apache.maven.shared.invoker.PrintStreamLogger;
import org.junit.Test;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.params.ParameterizedTest;
import org.junit.jupiter.params.provider.Arguments;
import org.junit.jupiter.params.provider.MethodSource;
Expand Down Expand Up @@ -93,7 +93,7 @@ public void generateCustomRESTEasyJavaProject() throws Exception {
"\"/bonjour\"");

checkContent(generatedProjectPath.resolve("src/test/java/com/andy/NativeBonjourResourceIT.java"),
"package comandy;",
"package com.andy;",
"class NativeBonjourResourceIT extends BonjourResourceTest");
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
import static io.quarkus.maven.it.ApplicationNameAndVersionTestUtil.assertApplicationPropertiesSetCorrectly;
import static org.assertj.core.api.Assertions.assertThat;
import static org.awaitility.Awaitility.await;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertTrue;

import java.io.BufferedReader;
import java.io.File;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
import org.jboss.shrinkwrap.api.ShrinkWrap;
import org.jboss.shrinkwrap.api.exporter.ZipExporter;
import org.jboss.shrinkwrap.api.spec.JavaArchive;
import org.junit.Assert;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.condition.EnabledForJreRange;
Expand Down Expand Up @@ -138,7 +137,7 @@ public void testPlatformPropertiesOverridenInApplicationProperties() throws Exce
Process process = doLaunch(new File(testDir, "app/target"), Paths.get("acme-app-1.0-SNAPSHOT-runner.jar"), output,
Collections.emptyList()).start();
try {
Assert.assertEquals("builder-image is customized", DevModeTestUtils.getHttpResponse("/hello"));
Assertions.assertEquals("builder-image is customized", DevModeTestUtils.getHttpResponse("/hello"));
} finally {
process.destroy();
}
Expand All @@ -163,7 +162,7 @@ public void testPlatformPropertiesOverridenOnCommandLine() throws Exception {
Process process = doLaunch(new File(testDir, "app/target"), Paths.get("acme-app-1.0-SNAPSHOT-runner.jar"), output,
Collections.emptyList()).start();
try {
Assert.assertEquals("builder-image is commandline", DevModeTestUtils.getHttpResponse("/hello"));
Assertions.assertEquals("builder-image is commandline", DevModeTestUtils.getHttpResponse("/hello"));
} finally {
process.destroy();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
import java.util.zip.ZipInputStream;

import org.apache.maven.shared.invoker.MavenInvocationException;
import org.junit.Assert;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;

import io.quarkus.maven.it.verifier.MavenProcessInvocationResult;
Expand Down Expand Up @@ -203,7 +203,7 @@ public void testRunnerUberJarHasValidCRC() throws Exception {
assertThat(getNumberOfFilesEndingWith(targetDir, ".original")).isEqualTo(1);

final Path runnerJar = targetDir.toPath().resolve("acme-1.0-SNAPSHOT-runner.jar");
Assert.assertTrue("Runner jar " + runnerJar + " is missing", Files.exists(runnerJar));
Assertions.assertTrue(Files.exists(runnerJar), "Runner jar " + runnerJar + " is missing");
assertZipEntriesCanBeOpenedAndClosed(runnerJar);
}

Expand All @@ -229,7 +229,7 @@ public void testRunnerJarHasValidCRC() throws Exception {
assertThat(getNumberOfFilesEndingWith(targetDir, ".jar")).isEqualTo(2);

final Path runnerJar = targetDir.toPath().resolve("acme-1.0-SNAPSHOT-runner.jar");
Assert.assertTrue("Runner jar " + runnerJar + " is missing", Files.exists(runnerJar));
Assertions.assertTrue(Files.exists(runnerJar), "Runner jar " + runnerJar + " is missing");
assertZipEntriesCanBeOpenedAndClosed(runnerJar);
}

Expand All @@ -250,7 +250,7 @@ public void testQuarkusIndexDependencyOnLocalModule() throws Exception {
assertThat(getNumberOfFilesEndingWith(targetDir, ".jar")).isEqualTo(2);

final Path runnerJar = targetDir.toPath().resolve("quarkus-quickstart-multimodule-main-1.0-SNAPSHOT-runner.jar");
Assert.assertTrue("Runner jar " + runnerJar + " is missing", Files.exists(runnerJar));
Assertions.assertTrue(Files.exists(runnerJar), "Runner jar " + runnerJar + " is missing");
assertZipEntriesCanBeOpenedAndClosed(runnerJar);
}

Expand Down
5 changes: 0 additions & 5 deletions integration-tests/packaging/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,6 @@
<artifactId>assertj-core</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-junit5-internal</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

import org.jboss.shrinkwrap.api.ShrinkWrap;
import org.jboss.shrinkwrap.api.spec.JavaArchive;
import org.junit.Assert;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.RegisterExtension;

Expand Down Expand Up @@ -44,12 +44,11 @@ public void testManifestEntries() throws Exception {
Attributes testAttributes = manifest.getEntries().get("Test-Information");
assertThat(testAttributes).isNotNull();
Attributes.Name testKey1 = new Attributes.Name("Test-Key-1");
Assert.assertTrue("Custom Manifest Entry for Test-Key-1 is missing",
testAttributes.containsKey(testKey1));
Assert.assertEquals("Custom Manifest Entry for Test-Key-1 value is not correct",
"Test Value 1", testAttributes.getValue(testKey1));
Assert.assertTrue("Custom Manifest Entry for Test-Key-2 is missing",
testAttributes.containsKey(new Attributes.Name("Test-Key-2")));
Assertions.assertTrue(testAttributes.containsKey(testKey1), "Custom Manifest Entry for Test-Key-1 is missing");
Assertions.assertEquals("Test Value 1", testAttributes.getValue(testKey1),
"Custom Manifest Entry for Test-Key-1 value is not correct");
Assertions.assertTrue(testAttributes.containsKey(new Attributes.Name("Test-Key-2")),
"Custom Manifest Entry for Test-Key-2 is missing");
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

import org.jboss.shrinkwrap.api.ShrinkWrap;
import org.jboss.shrinkwrap.api.spec.JavaArchive;
import org.junit.Assert;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.RegisterExtension;

Expand Down Expand Up @@ -44,12 +44,11 @@ public void testManifestEntries() throws Exception {
Attributes testAttributes = manifest.getEntries().get("Test-Information");
assertThat(testAttributes).isNotNull();
Attributes.Name testKey1 = new Attributes.Name("Test-Key-1");
Assert.assertTrue("Custom Manifest Entry for Test-Key-1 is missing",
testAttributes.containsKey(testKey1));
Assert.assertEquals("Custom Manifest Entry for Test-Key-1 value is not correct",
"Test Value 1", testAttributes.getValue(testKey1));
Assert.assertTrue("Custom Manifest Entry for Test-Key-2 is missing",
testAttributes.containsKey(new Attributes.Name("Test-Key-2")));
Assertions.assertTrue(testAttributes.containsKey(testKey1), "Custom Manifest Entry for Test-Key-1 is missing");
Assertions.assertEquals("Test Value 1", testAttributes.getValue(testKey1),
"Custom Manifest Entry for Test-Key-1 value is not correct");
Assertions.assertTrue(testAttributes.containsKey(new Attributes.Name("Test-Key-2")),
"Custom Manifest Emntry for Test-Key-2 is missing");
}
}
}
Expand Down

0 comments on commit da12df2

Please sign in to comment.