Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,11 @@
<artifactId>junit</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-api</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
import static org.junit.Assert.assertNotSame;
import static org.junit.Assert.assertSame;
import static org.junit.Assert.assertTrue;
import static org.junit.jupiter.api.Assertions.assertThrows;

import java.io.IOException;
import java.io.Serializable;
Expand Down Expand Up @@ -221,18 +222,18 @@ public void testInterceptingProxySerializable() throws Exception
assertSerializable(proxy);
}

@Test(expected = IOException.class)
public void testInterceptorProxyWithCheckedException() throws Exception
@Test
public void testInterceptorProxyWithCheckedException()
{
final Echo proxy = factory.createInterceptorProxy(new EchoImpl(), new NoOpMethodInterceptor(), ECHO_ONLY);
proxy.ioException();
assertThrows(IOException.class, () -> proxy.ioException());
}

@Test(expected = IllegalArgumentException.class)
public void testInterceptorProxyWithUncheckedException() throws Exception
@Test
public void testInterceptorProxyWithUncheckedException()
{
final Echo proxy = factory.createInterceptorProxy(new EchoImpl(), new NoOpMethodInterceptor(), ECHO_ONLY);
proxy.illegalArgument();
assertThrows(IllegalArgumentException.class, () -> proxy.illegalArgument());
}

@Test
Expand Down Expand Up @@ -326,18 +327,18 @@ public void testPrimitiveParameter()
assertEquals(1, echo.echoBack(1));
}

@Test(expected = IOException.class)
public void testProxyWithCheckedException() throws Exception
@Test
public void testProxyWithCheckedException()
{
final Echo proxy = factory.createDelegatorProxy(new ConstantProvider<Echo>(new EchoImpl()), Echo.class);
proxy.ioException();
assertThrows(IOException.class, () -> proxy.ioException());
}

@Test(expected = IllegalArgumentException.class)
public void testProxyWithUncheckedException() throws Exception
@Test
public void testProxyWithUncheckedException()
{
final Echo proxy = factory.createDelegatorProxy(new ConstantProvider<Echo>(new EchoImpl()), Echo.class);
proxy.illegalArgument();
assertThrows(IllegalArgumentException.class, () -> proxy.illegalArgument());
}

@Test
Expand Down