Skip to content

Commit 8ffa2da

Browse files
Update mockito monorepo to v5 (major) (#2683)
1 parent 75dac1b commit 8ffa2da

File tree

9 files changed

+16
-16
lines changed

9 files changed

+16
-16
lines changed

cucumber-core/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
<xmlunit.version>2.9.1</xmlunit.version>
2121
<hamcrest.version>2.2</hamcrest.version>
2222
<hamcrest-json.version>0.2</hamcrest-json.version>
23-
<mockito.version>4.11.0</mockito.version>
23+
<mockito.version>5.3.1</mockito.version>
2424
<vertx.version>4.4.1</vertx.version>
2525
<reactive-streams.version>1.0.4</reactive-streams.version>
2626
</properties>

cucumber-core/src/test/java/io/cucumber/core/runner/PickleStepTestStepTest.java

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -164,9 +164,9 @@ void result_is_result_from_hook_when_before_step_hook_does_not_pass() {
164164
assertThat(state.getStatus(), is(equalTo(FAILED)));
165165

166166
ArgumentCaptor<TestCaseEvent> captor = forClass(TestCaseEvent.class);
167-
verify(bus, times(12)).send(captor.capture());
167+
verify(bus, times(6)).send(captor.capture());
168168
List<TestCaseEvent> allValues = captor.getAllValues();
169-
assertThat(((TestStepFinished) allValues.get(2)).getResult(), is(equalTo(failure)));
169+
assertThat(((TestStepFinished) allValues.get(1)).getResult(), is(equalTo(failure)));
170170
}
171171

172172
@Test
@@ -179,9 +179,9 @@ void result_is_result_from_step_when_step_hook_does_not_pass() throws Throwable
179179
assertThat(state.getStatus(), is(equalTo(FAILED)));
180180

181181
ArgumentCaptor<TestCaseEvent> captor = forClass(TestCaseEvent.class);
182-
verify(bus, times(12)).send(captor.capture());
182+
verify(bus, times(6)).send(captor.capture());
183183
List<TestCaseEvent> allValues = captor.getAllValues();
184-
assertThat(((TestStepFinished) allValues.get(6)).getResult(), is(equalTo(failure)));
184+
assertThat(((TestStepFinished) allValues.get(3)).getResult(), is(equalTo(failure)));
185185
}
186186

187187
@Test
@@ -194,9 +194,9 @@ void result_is_result_from_hook_when_after_step_hook_does_not_pass() {
194194
assertThat(state.getStatus(), is(equalTo(FAILED)));
195195

196196
ArgumentCaptor<Object> captor = forClass(TestCaseEvent.class);
197-
verify(bus, times(12)).send(captor.capture());
197+
verify(bus, times(6)).send(captor.capture());
198198
List<Object> allValues = captor.getAllValues();
199-
assertThat(((TestStepFinished) allValues.get(10)).getResult(), is(equalTo(failure)));
199+
assertThat(((TestStepFinished) allValues.get(5)).getResult(), is(equalTo(failure)));
200200
}
201201

202202
@Test
@@ -281,11 +281,11 @@ void step_execution_time_is_measured() {
281281
step.run(testCase, bus, state, ExecutionMode.RUN);
282282

283283
ArgumentCaptor<TestCaseEvent> captor = forClass(TestCaseEvent.class);
284-
verify(bus, times(4)).send(captor.capture());
284+
verify(bus, times(2)).send(captor.capture());
285285

286286
List<TestCaseEvent> allValues = captor.getAllValues();
287287
TestStepStarted started = (TestStepStarted) allValues.get(0);
288-
TestStepFinished finished = (TestStepFinished) allValues.get(2);
288+
TestStepFinished finished = (TestStepFinished) allValues.get(1);
289289

290290
assertAll(
291291
() -> assertThat(started.getInstant(), is(equalTo(ofEpochMilli(234L)))),

cucumber-guice/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
<hamcrest.version>2.2</hamcrest.version>
1818
<junit-jupiter.version>5.9.3</junit-jupiter.version>
1919
<project.Automatic-Module-Name>io.cucumber.guice</project.Automatic-Module-Name>
20-
<mockito.version>4.11.0</mockito.version>
20+
<mockito.version>5.3.1</mockito.version>
2121
</properties>
2222

2323
<dependencyManagement>

cucumber-java/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
<hamcrest.version>2.2</hamcrest.version>
1818
<jackson.version>2.15.0</jackson.version>
1919
<junit-jupiter.version>5.9.3</junit-jupiter.version>
20-
<mockito.version>4.11.0</mockito.version>
20+
<mockito.version>5.3.1</mockito.version>
2121
</properties>
2222

2323
<dependencyManagement>

cucumber-java8/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
<apiguardian-api.version>1.1.2</apiguardian-api.version>
1717
<hamcrest.version>2.2</hamcrest.version>
1818
<junit-jupiter.version>5.9.3</junit-jupiter.version>
19-
<mockito.version>4.11.0</mockito.version>
19+
<mockito.version>5.3.1</mockito.version>
2020
<typetools.version>0.6.3</typetools.version>
2121
</properties>
2222

cucumber-junit/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
<hamcrest.version>2.2</hamcrest.version>
1717
<junit-jupiter.version>5.9.3</junit-jupiter.version>
1818
<junit.version>4.13.2</junit.version>
19-
<mockito.version>4.11.0</mockito.version>
19+
<mockito.version>5.3.1</mockito.version>
2020
<project.Automatic-Module-Name>io.cucumber.junit</project.Automatic-Module-Name>
2121
</properties>
2222

cucumber-spring/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
<junit-jupiter.version>5.9.3</junit-jupiter.version>
1818
<spring.version>6.0.8</spring.version>
1919
<project.Automatic-Module-Name>io.cucumber.spring</project.Automatic-Module-Name>
20-
<mockito.version>4.11.0</mockito.version>
20+
<mockito.version>5.3.1</mockito.version>
2121
</properties>
2222

2323
<dependencyManagement>

cucumber-testng/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
<hamcrest.version>2.2</hamcrest.version>
1717
<testng.version>7.7.1</testng.version>
1818
<apiguardian-api.version>1.1.2</apiguardian-api.version>
19-
<mockito.version>4.11.0</mockito.version>
19+
<mockito.version>5.3.1</mockito.version>
2020
</properties>
2121

2222
<dependencyManagement>

datatable/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
<hamcrest.version>2.2</hamcrest.version>
2121
<jackson.version>2.15.0</jackson.version>
2222
<junit-jupiter.version>5.9.3</junit-jupiter.version>
23-
<mockito.version>4.11.0</mockito.version>
23+
<mockito.version>5.3.1</mockito.version>
2424
</properties>
2525

2626
<dependencyManagement>

0 commit comments

Comments
 (0)