Assert pre-conditions in AopTestUtils

Issue: SPR-13005
This commit is contained in:
Sam Brannen
2015-05-09 21:02:40 +02:00
parent efe3a35da8
commit cf51f0c0aa
2 changed files with 17 additions and 6 deletions

View File

@@ -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);