File tree Expand file tree Collapse file tree 3 files changed +15
-13
lines changed
src/test/java/com/rabbitmq/client Expand file tree Collapse file tree 3 files changed +15
-13
lines changed Original file line number Diff line number Diff line change 1515
1616package com .rabbitmq .client ;
1717
18+ import static org .junit .jupiter .api .Assertions .assertEquals ;
19+ import static org .junit .jupiter .api .Assertions .assertFalse ;
20+ import static org .junit .jupiter .api .Assertions .assertTrue ;
21+ import static org .junit .jupiter .api .Assertions .fail ;
22+
1823import com .rabbitmq .tools .jsonrpc .DefaultJsonRpcMapper ;
1924import com .rabbitmq .tools .jsonrpc .JsonRpcException ;
2025import com .rabbitmq .tools .jsonrpc .JsonRpcMapper ;
21- import org .junit .Test ;
2226
2327import java .lang .reflect .UndeclaredThrowableException ;
24-
25- import static org .junit .Assert .assertEquals ;
26- import static org .junit .Assert .assertFalse ;
27- import static org .junit .Assert .assertTrue ;
28- import static org .junit .Assert .fail ;
28+ import org .junit .jupiter .api .Test ;
2929
3030public class DefaultJsonRpcTest extends AbstractJsonRpcTest {
3131
Original file line number Diff line number Diff line change @@ -56,11 +56,12 @@ public void serverBasicCancelForUnknownConsumerDoesNotThrowException() throws Ex
5656 channel .processAsync (new AMQCommand (method ));
5757 }
5858
59- @ Test ( expected = IOException . class )
59+ @ Test
6060 public void callingBasicCancelForUnknownConsumerThrowsException () throws Exception {
6161 AMQConnection connection = Mockito .mock (AMQConnection .class );
6262 ChannelN channel = new ChannelN (connection , 1 , consumerWorkService );
63- channel .basicCancel ("does-not-exist" );
63+ assertThatThrownBy (() -> channel .basicCancel ("does-not-exist" ))
64+ .isInstanceOf (IOException .class );
6465 }
6566
6667 @ Test
Original file line number Diff line number Diff line change 1616
1717package com .rabbitmq .client .test ;
1818
19+ import static org .junit .jupiter .api .Assertions .assertEquals ;
20+ import static org .junit .jupiter .api .Assertions .fail ;
21+
1922import com .rabbitmq .tools .json .JSONReader ;
2023import com .rabbitmq .tools .json .JSONWriter ;
21- import org .junit .Test ;
22-
23- import static org .junit .Assert .assertEquals ;
24- import static org .junit .Assert .fail ;
24+ import org .junit .jupiter .api .Test ;
2525
2626public class JSONReadWriteTest {
2727
28- @ Test public void readWriteSimple () throws Exception {
28+ @ Test
29+ public void readWriteSimple () throws Exception {
2930
3031 Object myRet ;
3132 String myJson ;
You can’t perform that action at this time.
0 commit comments