Skip to content

Spring Aspects to provide basic static mock test functionality [SPR-6274] #10941

@spring-projects-issues

Description

@spring-projects-issues

Ben Alex opened SPR-6274 and commented

Spring Roo presently supports creation of mocks for static methods. As per email discussion between Juergen, Ramnivas and Ben, it would be useful if these classes were ported to Spring Aspects.

Please see the following location in Spring Roo code for the templates to use:

https://fisheye.springsource.org/browse/spring-roo/trunk/addon-test/src/main/resources/org/springframework/roo/addon/test/AbstractMethodMockingControl.aj-template
https://fisheye.springsource.org/browse/spring-roo/trunk/addon-test/src/main/resources/org/springframework/roo/addon/test/JUnitStaticEntityMockingControl.aj-template
https://fisheye.springsource.org/browse/spring-roo/trunk/addon-test/src/main/resources/org/springframework/roo/addon/test/MockStaticEntityMethods.java-template

Please see the following Jira issues for background on this feature and key considerations:

https://jira.springsource.org/browse/ROO-92
https://jira.springsource.org/browse/ROO-202
https://jira.springsource.org/browse/ROO-272

Once this functionality has been added to Spring Framework, I will modify the Roo usage accordingly (as is being tracked in ROO-314).


Issue Links:

  • ROO-314 Use Spring Framework-provided static mock integration test services ("is depended on by")

Metadata

Metadata

Assignees

No one assigned

    Labels

    in: coreIssues in core modules (aop, beans, core, context, expression)type: enhancementA general enhancement

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions