|
4 | 4 | import static org.hamcrest.MatcherAssert.assertThat; |
5 | 5 | import static org.hamcrest.Matchers.containsString; |
6 | 6 | import static org.hamcrest.Matchers.equalTo; |
7 | | -import static org.junit.jupiter.api.Assertions.*; |
| 7 | +import static org.junit.jupiter.api.Assertions.assertEquals; |
| 8 | +import static org.junit.jupiter.api.Assertions.assertNotNull; |
| 9 | +import static org.junit.jupiter.api.Assertions.assertThrows; |
| 10 | +import static org.junit.jupiter.api.Assertions.assertTrue; |
8 | 11 | import static org.mockito.ArgumentMatchers.anyString; |
9 | 12 | import static org.mockito.ArgumentMatchers.eq; |
10 | 13 | import static org.mockito.Mockito.doAnswer; |
|
38 | 41 | import java.util.List; |
39 | 42 | import java.util.Locale; |
40 | 43 | import java.util.Set; |
41 | | -import jenkins.model.Jenkins; |
42 | 44 | import org.hamcrest.Matchers; |
43 | 45 | import org.jenkinsci.plugins.workflow.job.WorkflowJob; |
44 | 46 | import org.jenkinsci.plugins.workflow.job.WorkflowRun; |
@@ -295,12 +297,8 @@ void issueIsRemovedFromCarryOverListAfterSubmission() throws RestClientException |
295 | 297 | * |
296 | 298 | */ |
297 | 299 | @Test |
298 | | - @WithoutJenkins |
299 | | - void getChangesUsingReflectionForWorkflowJob() throws IOException { |
300 | | - Jenkins jenkins = mock(Jenkins.class); |
301 | | - |
302 | | - when(jenkins.getRootDirFor(Mockito.any())).thenReturn(folder); |
303 | | - WorkflowJob workflowJob = new WorkflowJob(jenkins, "job"); |
| 300 | + void getChangesUsingReflectionForWorkflowJob(JenkinsRule r) throws IOException { |
| 301 | + WorkflowJob workflowJob = new WorkflowJob(r.getInstance(), "job"); |
304 | 302 | WorkflowRun workflowRun = new WorkflowRun(workflowJob); |
305 | 303 |
|
306 | 304 | ChangeLogSet.createEmpty(workflowRun); |
|
0 commit comments