Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introduce AopTestUtils in spring-test [SPR-13005] #17597

Closed
spring-issuemaster opened this issue May 9, 2015 · 1 comment

Comments

Projects
None yet
2 participants
@spring-issuemaster
Copy link
Collaborator

commented May 9, 2015

Sam Brannen opened SPR-13005 and commented

Status Quo

AopProxyUtils provides for determining the ultimate target class for a proxied object via ultimateTargetClass(Object); however, there is currently no first-class support for determining the ultimate target object behind a proxy of set of nested proxies.

In testing scenarios it is sometimes necessary to obtain a reference to the underlying target object -- for example, to configure expectations on a mocked bean that was proxied by Spring.

Deliverables

  1. Introduce support in the spring-test module for retrieving the ultimate target object behind a proxy.

Issue Links:

  • #17598 Document AopTestUtils in the reference manual ("is depended on by")

Referenced from: commits cf51f0c, efe3a35

@spring-issuemaster

This comment has been minimized.

Copy link
Collaborator Author

commented May 9, 2015

Sam Brannen commented

Completed as described in GitHub commit efe3a35:

Introduce AOP testing utilities

This commit introduces support in the spring-test module for obtaining a reference to the underlying target object hidden behind one or more proxies.

Specifically this commit introduces AopTestUtils with two methods:

  • getTargetObject(Object)
  • getUltimateTargetObject(Object)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.