-
Bug
-
Resolution: Fixed
-
Minor
-
None
-
-
2.4
Eg. CustomDataMapPointGeneratorTest and CustomDataPointGeneratorTest fail to compile with
The method thenReturn(capture#5-of ?) in the type OngoingStubbing<capture#5-of ?> is not applicable for the arguments (Job)
Apparently the Job mock does not match the expected types.
[JENKINS-61079] Tests have compilation errors in 2.1
Status | Original: Open [ 1 ] | New: In Progress [ 3 ] |
Status | Original: In Progress [ 3 ] | New: In Review [ 10005 ] |
Resolution | New: Fixed [ 1 ] | |
Status | Original: In Review [ 10005 ] | New: Resolved [ 5 ] |
Status | Original: Resolved [ 5 ] | New: Fixed but Unreleased [ 10203 ] |
Released As | New: 2.4 | |
Status | Original: Fixed but Unreleased [ 10203 ] | New: Resolved [ 5 ] |
The fix is actually really simple, just use the type-unsafe doReturn on the Job mock. Like so:
Mockito.doReturn(job).when(build).getParent();
Don't have the time to go through a pull request myself, unfortunately.