Explain mock scope in static method mocking aspect

master
Sam Brannen 11 years ago
parent 67142dcb0a
commit 81c259fe42
  1. 7
      spring-aspects/src/main/java/org/springframework/mock/staticmock/AnnotationDrivenStaticEntityMockingControl.aj

@ -21,8 +21,11 @@ package org.springframework.mock.staticmock;
* on JPA-annotated {@code @Entity} classes, as used by Spring Roo for so-called * on JPA-annotated {@code @Entity} classes, as used by Spring Roo for so-called
* <em>finder methods</em>. * <em>finder methods</em>.
* *
* <p>Mocking will occur within the call stack of any method in a class (typically a * <p>Mocking will occur within the call stack of any {@code public} method in a
* test class) that is annotated with {@code @MockStaticEntityMethods}. * class (typically a test class) that is annotated with {@code @MockStaticEntityMethods}.
* Thus mocking is not limited to {@code @Test} methods. Furthermore, new mock
* state will be created for the invocation of each such public method, even when
* the method is invoked from another such public method.
* *
* <p>This aspect also provides static methods to simplify the programming model for * <p>This aspect also provides static methods to simplify the programming model for
* setting expectations and entering playback mode. * setting expectations and entering playback mode.

Loading…
Cancel
Save