Assert pre-conditions in AopTestUtils
Issue: SPR-13005
This commit is contained in:
@@ -36,6 +36,11 @@ public class AopTestUtilsTests {
|
||||
private final FooImpl foo = new FooImpl();
|
||||
|
||||
|
||||
@Test(expected = IllegalArgumentException.class)
|
||||
public void getTargetObjectForNull() {
|
||||
getTargetObject(null);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void getTargetObjectForNonProxiedObject() {
|
||||
Foo target = getTargetObject(foo);
|
||||
@@ -66,6 +71,11 @@ public class AopTestUtilsTests {
|
||||
assertNotSame(foo, target);
|
||||
}
|
||||
|
||||
@Test(expected = IllegalArgumentException.class)
|
||||
public void getUltimateTargetObjectForNull() {
|
||||
getUltimateTargetObject(null);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void getUltimateTargetObjectForNonProxiedObject() {
|
||||
Foo target = getUltimateTargetObject(foo);
|
||||
|
||||
Reference in New Issue
Block a user