Skip to content

Commit

Permalink
[RESTEASY-3475] Migrate the resteasy-html to JUnit 5.
Browse files Browse the repository at this point in the history
https://issues.redhat.com/browse/RESTEASY-3475
Signed-off-by: James R. Perkins <jperkins@redhat.com>
  • Loading branch information
jamezp committed Mar 22, 2024
1 parent 17f14e2 commit 3cf17f3
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 9 deletions.
4 changes: 2 additions & 2 deletions providers/resteasy-html/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@

<!-- Test dependencies -->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@

import org.jboss.logging.Logger;
import org.jboss.resteasy.plugins.providers.html.i18n.Messages;
import org.junit.Assert;
import org.junit.Test;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;

/**
*
Expand All @@ -27,7 +27,8 @@ public void testLocale() throws Exception {
return;
}

Assert.assertEquals(getExpected(BASE + "00", "noDispatcherFound", "path"), Messages.MESSAGES.noDispatcherFound("path"));
Assertions.assertEquals(getExpected(BASE + "00", "noDispatcherFound", "path"),
Messages.MESSAGES.noDispatcherFound("path"));
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
import java.util.Properties;

import org.jboss.logging.Logger;
import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.jupiter.api.AfterAll;
import org.junit.jupiter.api.BeforeAll;

/**
*
Expand All @@ -20,12 +20,12 @@ public abstract class TestMessagesParent {
protected static Locale savedLocale;
protected Properties properties = new Properties();

@BeforeClass
@BeforeAll
public static void beforeClass() {
savedLocale = Locale.getDefault();
}

@AfterClass
@AfterAll
public static void afterClass() {
Locale.setDefault(savedLocale);
LOG.info("Reset default locale to: " + savedLocale);
Expand Down

0 comments on commit 3cf17f3

Please sign in to comment.