File tree Expand file tree Collapse file tree 2 files changed +11
-0
lines changed
main/java/org/apache/maven/enforcer/rules
test/java/org/apache/maven/enforcer/rules Expand file tree Collapse file tree 2 files changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -392,6 +392,11 @@ private void addMessageIfExist(StringBuilder sb) {
392
392
}
393
393
}
394
394
395
+ @ Override
396
+ public String getCacheId () {
397
+ return String .valueOf (toString ().hashCode ());
398
+ }
399
+
395
400
@ Override
396
401
public String toString () {
397
402
return String .format (
Original file line number Diff line number Diff line change 32
32
import org .junit .jupiter .api .BeforeEach ;
33
33
import org .junit .jupiter .api .Test ;
34
34
35
+ import static org .assertj .core .api .Assertions .assertThat ;
35
36
import static org .junit .jupiter .api .Assertions .assertThrows ;
36
37
import static org .mockito .Mockito .mock ;
37
38
import static org .mockito .Mockito .when ;
@@ -221,6 +222,11 @@ void shouldFailWithWrongDependencyInReactor() {
221
222
// intentionally no assertTrue() cause we expect getting an exception.
222
223
}
223
224
225
+ @ Test
226
+ void cacheIdShouldBeSet () {
227
+ assertThat (rule .getCacheId ()).isNotEmpty ();
228
+ }
229
+
224
230
/**
225
231
* This small setup is equivalent to the following situation:
226
232
*
You can’t perform that action at this time.
0 commit comments