|
1 | 1 | /* |
2 | | - * Copyright 2002-2013 the original author or authors. |
| 2 | + * Copyright 2002-2014 the original author or authors. |
3 | 3 | * |
4 | 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
5 | 5 | * you may not use this file except in compliance with the License. |
|
17 | 17 | package org.springframework.mock.staticmock; |
18 | 18 |
|
19 | 19 | /** |
20 | | - * Annotation-based aspect to use in test build to enable mocking static methods |
21 | | - * on JPA-annotated {@code @Entity} classes, as used by Roo for finders. |
| 20 | + * Annotation-based aspect to use in test builds to enable mocking static methods |
| 21 | + * on JPA-annotated {@code @Entity} classes, as used by Spring Roo for finders. |
22 | 22 | * |
23 | 23 | * <p>Mocking will occur in the call stack of any method in a class (typically a test class) |
24 | | - * that is annotated with the @MockStaticEntityMethods annotation. |
| 24 | + * that is annotated with the {@code @MockStaticEntityMethods} annotation. |
25 | 25 | * |
26 | 26 | * <p>Also provides static methods to simplify the programming model for |
27 | 27 | * entering playback mode and setting expected return values. |
28 | 28 | * |
29 | 29 | * <p>Usage: |
30 | 30 | * <ol> |
31 | | - * <li>Annotate a test class with @MockStaticEntityMethods. |
32 | | - * <li>In each test method, AnnotationDrivenStaticEntityMockingControl will begin in recording mode. |
33 | | - * Invoke static methods on Entity classes, with each recording-mode invocation |
34 | | - * being followed by an invocation to the static expectReturn() or expectThrow() |
35 | | - * method on AnnotationDrivenStaticEntityMockingControl. |
36 | | - * <li>Invoke the static AnnotationDrivenStaticEntityMockingControl() method. |
37 | | - * <li>Call the code you wish to test that uses the static methods. Verification will |
38 | | - * occur automatically. |
| 31 | + * <li>Annotate a test class with {@code @MockStaticEntityMethods}. |
| 32 | + * <li>In each test method, {@code AnnotationDrivenStaticEntityMockingControl} |
| 33 | + * will begin in recording mode. |
| 34 | + * <li>Invoke static methods on JPA-annotated {@code @Entity} classes, with each |
| 35 | + * recording-mode invocation being followed by an invocation of either the static |
| 36 | + * {@link #expectReturn(Object)} method or the static {@link #expectThrow(Throwable)} |
| 37 | + * method on {@code AnnotationDrivenStaticEntityMockingControl}. |
| 38 | + * <li>Invoke the static {@link #playback()} method. |
| 39 | + * <li>Call the code you wish to test that uses the static methods. |
| 40 | + * <li>Verification will occur automatically. |
39 | 41 | * </ol> |
40 | 42 | * |
41 | 43 | * @author Rod Johnson |
42 | 44 | * @author Ramnivas Laddad |
| 45 | + * @author Sam Brannen |
43 | 46 | * @see MockStaticEntityMethods |
44 | 47 | */ |
45 | 48 | public aspect AnnotationDrivenStaticEntityMockingControl extends AbstractMethodMockingControl { |
|
0 commit comments