Skip to content

Commit 0876afb

Browse files
Fix migration
1 parent 32a2d74 commit 0876afb

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

src/test/java/org/jenkinsci/plugins/workflow/steps/FlowInterruptedExceptionTest.java

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -27,23 +27,23 @@
2727
import static org.hamcrest.MatcherAssert.assertThat;
2828
import static org.hamcrest.Matchers.containsString;
2929
import static org.hamcrest.Matchers.equalTo;
30+
import static org.mockito.Mockito.mock;
31+
import static org.mockito.Mockito.when;
3032

3133
import hudson.model.Result;
3234
import hudson.model.Run;
3335
import jenkins.model.CauseOfInterruption;
3436
import org.jenkinsci.plugins.workflow.job.properties.DisableConcurrentBuildsJobProperty;
35-
import org.junit.Assert;
36-
import org.junit.Test;
37-
import org.mockito.Mock;
37+
import org.junit.jupiter.api.Test;
3838
import org.mockito.Mockito;
3939

4040
/**
4141
* Tests some specific {@link FlowInterruptedException} APIs
4242
*/
43-
public class FlowInterruptedExceptionTest {
43+
class FlowInterruptedExceptionTest {
4444

4545
@Test
46-
public void getMessageReturnsCauses() {
46+
void getMessageReturnsCauses() {
4747
// given
4848
Result result = Result.ABORTED;
4949
CauseOfInterruption cause1 = new ExceptionCause(new IllegalStateException("something went wrong"));
@@ -58,11 +58,11 @@ public void getMessageReturnsCauses() {
5858
}
5959

6060
@Test
61-
public void toStringContainsCauses() {
61+
void toStringContainsCauses() {
6262
// given
6363
Result result = Result.FAILURE;
64-
Run run = Mockito.mock(Run.class);
65-
Mockito.when(run.getDisplayName()).thenReturn("fracture.account");
64+
Run run = mock(Run.class);
65+
when(run.getDisplayName()).thenReturn("fracture.account");
6666
CauseOfInterruption cause = new DisableConcurrentBuildsJobProperty.CancelledCause(run);
6767

6868
// when

0 commit comments

Comments
 (0)