Migrate codec-xml tests to JUnit 5 (#11311)

Motivation:

JUnit 5 is more expressive, extensible, and composable in many ways, and it's better able to run tests in parallel.

Modifications:

Use JUnit5 in codec-smtp tests

Result:

Related to https://github.com/netty/netty/issues/10757
This commit is contained in:
Riley Park 2021-05-26 01:06:05 -07:00 committed by GitHub
parent ab566ee357
commit f2f19c7fba
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -18,9 +18,9 @@ package io.netty.handler.codec.xml;
import io.netty.buffer.Unpooled;
import io.netty.channel.embedded.EmbeddedChannel;
import io.netty.util.CharsetUtil;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import static org.hamcrest.CoreMatchers.*;
import static org.hamcrest.MatcherAssert.*;
@ -52,12 +52,12 @@ public class XmlDecoderTest {
private EmbeddedChannel channel;
@Before
@BeforeEach
public void setup() throws Exception {
channel = new EmbeddedChannel(new XmlDecoder());
}
@After
@AfterEach
public void teardown() throws Exception {
channel.finish();
}