diff options
author | Bjørn Christian Seime <bjorncs@yahooinc.com> | 2022-07-28 14:58:52 +0200 |
---|---|---|
committer | Bjørn Christian Seime <bjorncs@yahooinc.com> | 2022-07-28 14:58:52 +0200 |
commit | 147fa8c912c8748a9b4eb25c67420841363f3be0 (patch) | |
tree | be43054d6d5ec6ee4d01645678d0f411d3242d68 /jdisc_core/src/test/java/com/yahoo/jdisc/handler/FastContentOutputStreamTestCase.java | |
parent | 695209a356ecae42536fd394189a98cf5274518e (diff) |
Convert jdisc_core to junit5
Diffstat (limited to 'jdisc_core/src/test/java/com/yahoo/jdisc/handler/FastContentOutputStreamTestCase.java')
-rw-r--r-- | jdisc_core/src/test/java/com/yahoo/jdisc/handler/FastContentOutputStreamTestCase.java | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/jdisc_core/src/test/java/com/yahoo/jdisc/handler/FastContentOutputStreamTestCase.java b/jdisc_core/src/test/java/com/yahoo/jdisc/handler/FastContentOutputStreamTestCase.java index 2cdc0e1256f..3f97fe014e6 100644 --- a/jdisc_core/src/test/java/com/yahoo/jdisc/handler/FastContentOutputStreamTestCase.java +++ b/jdisc_core/src/test/java/com/yahoo/jdisc/handler/FastContentOutputStreamTestCase.java @@ -1,15 +1,15 @@ // Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.jdisc.handler; -import org.junit.Test; +import org.junit.jupiter.api.Test; import org.mockito.Mockito; import java.nio.ByteBuffer; import java.util.concurrent.Executor; import java.util.concurrent.TimeUnit; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.fail; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.fail; /** @@ -18,15 +18,15 @@ import static org.junit.Assert.fail; public class FastContentOutputStreamTestCase { @Test - public void requireThatNullConstructorArgumentThrows() { + void requireThatNullConstructorArgumentThrows() { try { - new FastContentOutputStream((ContentChannel)null); + new FastContentOutputStream((ContentChannel) null); fail(); } catch (NullPointerException e) { assertEquals("out", e.getMessage()); } try { - new FastContentOutputStream((FastContentWriter)null); + new FastContentOutputStream((FastContentWriter) null); fail(); } catch (NullPointerException e) { assertEquals("out", e.getMessage()); @@ -34,11 +34,11 @@ public class FastContentOutputStreamTestCase { } @Test - public void requireThatAllMethodsDelegateToWriter() throws Exception { + void requireThatAllMethodsDelegateToWriter() throws Exception { FastContentWriter writer = Mockito.mock(FastContentWriter.class); FastContentOutputStream out = new FastContentOutputStream(writer); - out.write(new byte[] { 6, 9 }); + out.write(new byte[]{6, 9}); out.flush(); Mockito.verify(writer).write(Mockito.any(ByteBuffer.class)); |