Skip to content
This repository has been archived by the owner on Apr 16, 2024. It is now read-only.

Commit

Permalink
[ch06] Check proxy class instance.
Browse files Browse the repository at this point in the history
  • Loading branch information
dhsim86 committed Sep 12, 2017
1 parent 10d946e commit 10c3db6
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/test/java/ch01/springbook/user/UserServiceTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,12 @@ public void upgradeAllOrNothingUsingDynamicProxyBean() throws Exception {
checkLevelUpgraded(userList.get(1), false);
}

@Test
public void advisorAutoProxyCreatorTest() {
assertThat(java.lang.reflect.Proxy.isProxyClass(userService.getClass()), is(true));
assertThat(java.lang.reflect.Proxy.isProxyClass(testUserService.getClass()), is(true));
}

private void checkLevelUpgraded(User user, boolean upgraded) {

User userUpdate = userDao.get(user.getId());
Expand Down

0 comments on commit 10c3db6

Please sign in to comment.