Skip to content

Commit

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

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

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

/**
*
Expand All @@ -29,11 +29,11 @@ public void testLocale() throws Exception {
return;
}

Assert.assertEquals(getExpected(BASE + "05", "collectionWrappingFailedNamespace", "xyz", "http://localhost"),
Assertions.assertEquals(getExpected(BASE + "05", "collectionWrappingFailedNamespace", "xyz", "http://localhost"),
Messages.MESSAGES.collectionWrappingFailedNamespace("xyz", "http://localhost"));
Assert.assertEquals(getExpected(BASE + "10", "couldNotFindJAXBContextFinder", "xx/yy"),
Assertions.assertEquals(getExpected(BASE + "10", "couldNotFindJAXBContextFinder", "xx/yy"),
Messages.MESSAGES.couldNotFindJAXBContextFinder(new MediaType("xx", "yy")));
Assert.assertEquals(getExpected(BASE + "55", "validXmlRegistryCouldNotBeLocated", getClass()),
Assertions.assertEquals(getExpected(BASE + "55", "validXmlRegistryCouldNotBeLocated", getClass()),
Messages.MESSAGES.validXmlRegistryCouldNotBeLocated());
}

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 a4f1e8f

Please sign in to comment.