From 5da00ae3cc59a301d8c8eac60647e766762c64e4 Mon Sep 17 00:00:00 2001 From: strangelookingnerd <49242855+strangelookingnerd@users.noreply.github.com> Date: Mon, 14 Apr 2025 09:57:33 +0200 Subject: [PATCH] Migrate tests to JUnit5 * Migrate annotations and imports * Migrate assertions * Remove public visibility for test classes and methods * Minor code cleanup --- .../jenkins/plugins/postgresqlapi/ClasspathTest.java | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/test/java/io/jenkins/plugins/postgresqlapi/ClasspathTest.java b/src/test/java/io/jenkins/plugins/postgresqlapi/ClasspathTest.java index 6cd2d99..5cd3209 100644 --- a/src/test/java/io/jenkins/plugins/postgresqlapi/ClasspathTest.java +++ b/src/test/java/io/jenkins/plugins/postgresqlapi/ClasspathTest.java @@ -1,17 +1,19 @@ package io.jenkins.plugins.postgresqlapi; import static org.hamcrest.MatcherAssert.assertThat; + +import org.junit.jupiter.api.Test; import static org.hamcrest.CoreMatchers.*; -import org.junit.Test; -public class ClasspathTest { +class ClasspathTest { + @Test - public void testClasspath() throws ClassNotFoundException { + void testClasspath() throws ClassNotFoundException { assertThat(Class.forName("org.postgresql.Driver"), notNullValue()); } @Test - public void testDriver() { + void testDriver() { org.postgresql.Driver driver = new org.postgresql.Driver(); assertThat(driver.acceptsURL("jdbc:postgresql://localhost/postgres"), is(true)); }