Skip to content

Commit

Permalink
Update mockito monorepo to v5 (major) (#2683)
Browse files Browse the repository at this point in the history
  • Loading branch information
renovate[bot] authored Apr 29, 2023
1 parent 75dac1b commit 8ffa2da
Show file tree
Hide file tree
Showing 9 changed files with 16 additions and 16 deletions.
2 changes: 1 addition & 1 deletion cucumber-core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<xmlunit.version>2.9.1</xmlunit.version>
<hamcrest.version>2.2</hamcrest.version>
<hamcrest-json.version>0.2</hamcrest-json.version>
<mockito.version>4.11.0</mockito.version>
<mockito.version>5.3.1</mockito.version>
<vertx.version>4.4.1</vertx.version>
<reactive-streams.version>1.0.4</reactive-streams.version>
</properties>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -164,9 +164,9 @@ void result_is_result_from_hook_when_before_step_hook_does_not_pass() {
assertThat(state.getStatus(), is(equalTo(FAILED)));

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

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

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

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

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

@Test
Expand Down Expand Up @@ -281,11 +281,11 @@ void step_execution_time_is_measured() {
step.run(testCase, bus, state, ExecutionMode.RUN);

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

List<TestCaseEvent> allValues = captor.getAllValues();
TestStepStarted started = (TestStepStarted) allValues.get(0);
TestStepFinished finished = (TestStepFinished) allValues.get(2);
TestStepFinished finished = (TestStepFinished) allValues.get(1);

assertAll(
() -> assertThat(started.getInstant(), is(equalTo(ofEpochMilli(234L)))),
Expand Down
2 changes: 1 addition & 1 deletion cucumber-guice/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<hamcrest.version>2.2</hamcrest.version>
<junit-jupiter.version>5.9.3</junit-jupiter.version>
<project.Automatic-Module-Name>io.cucumber.guice</project.Automatic-Module-Name>
<mockito.version>4.11.0</mockito.version>
<mockito.version>5.3.1</mockito.version>
</properties>

<dependencyManagement>
Expand Down
2 changes: 1 addition & 1 deletion cucumber-java/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<hamcrest.version>2.2</hamcrest.version>
<jackson.version>2.15.0</jackson.version>
<junit-jupiter.version>5.9.3</junit-jupiter.version>
<mockito.version>4.11.0</mockito.version>
<mockito.version>5.3.1</mockito.version>
</properties>

<dependencyManagement>
Expand Down
2 changes: 1 addition & 1 deletion cucumber-java8/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<apiguardian-api.version>1.1.2</apiguardian-api.version>
<hamcrest.version>2.2</hamcrest.version>
<junit-jupiter.version>5.9.3</junit-jupiter.version>
<mockito.version>4.11.0</mockito.version>
<mockito.version>5.3.1</mockito.version>
<typetools.version>0.6.3</typetools.version>
</properties>

Expand Down
2 changes: 1 addition & 1 deletion cucumber-junit/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<hamcrest.version>2.2</hamcrest.version>
<junit-jupiter.version>5.9.3</junit-jupiter.version>
<junit.version>4.13.2</junit.version>
<mockito.version>4.11.0</mockito.version>
<mockito.version>5.3.1</mockito.version>
<project.Automatic-Module-Name>io.cucumber.junit</project.Automatic-Module-Name>
</properties>

Expand Down
2 changes: 1 addition & 1 deletion cucumber-spring/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<junit-jupiter.version>5.9.3</junit-jupiter.version>
<spring.version>6.0.8</spring.version>
<project.Automatic-Module-Name>io.cucumber.spring</project.Automatic-Module-Name>
<mockito.version>4.11.0</mockito.version>
<mockito.version>5.3.1</mockito.version>
</properties>

<dependencyManagement>
Expand Down
2 changes: 1 addition & 1 deletion cucumber-testng/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<hamcrest.version>2.2</hamcrest.version>
<testng.version>7.7.1</testng.version>
<apiguardian-api.version>1.1.2</apiguardian-api.version>
<mockito.version>4.11.0</mockito.version>
<mockito.version>5.3.1</mockito.version>
</properties>

<dependencyManagement>
Expand Down
2 changes: 1 addition & 1 deletion datatable/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<hamcrest.version>2.2</hamcrest.version>
<jackson.version>2.15.0</jackson.version>
<junit-jupiter.version>5.9.3</junit-jupiter.version>
<mockito.version>4.11.0</mockito.version>
<mockito.version>5.3.1</mockito.version>
</properties>

<dependencyManagement>
Expand Down

0 comments on commit 8ffa2da

Please sign in to comment.