Skip to content

Commit

Permalink
Replace deprecated verifyZeroInteractions with verifyNoInteractions
Browse files Browse the repository at this point in the history
  • Loading branch information
ljacqu committed Nov 7, 2019
1 parent 1080363 commit 2f160c2
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
import static org.junit.Assert.assertThat;
import static org.junit.Assert.fail;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.verifyZeroInteractions;
import static org.mockito.Mockito.verifyNoInteractions;

/**
* Test for {@link ProviderHandler}.
Expand Down Expand Up @@ -224,7 +224,7 @@ void shouldThrowForMissingGenericInfo() {
fail("Expected exception to be thrown");
} catch (InjectorException e) {
assertThat(e.getMessage(), equalTo("Injection of a provider was requested but no generic type was given"));
verifyZeroInteractions(injector);
verifyNoInteractions(injector);
}
}

Expand All @@ -241,7 +241,7 @@ void shouldIgnoreNonProviderDependency() {

// then
assertThat(value, nullValue());
verifyZeroInteractions(injector);
verifyNoInteractions(injector);
}

private static ResolutionContext newContext(Class<?> clz) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
import static org.junit.Assert.assertThat;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.verifyZeroInteractions;
import static org.mockito.Mockito.verifyNoInteractions;

/**
* Test for {@link DelayedInjectionRunnerValidator}.
Expand All @@ -37,7 +37,7 @@ void shouldValidateSuccessfully() throws Exception {

// then
// nothing happens: successful validation
verifyZeroInteractions(notifier, description);
verifyNoInteractions(notifier, description);
}

@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
import static org.junit.Assert.assertThat;
import static org.junit.jupiter.api.Assertions.assertThrows;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.verifyZeroInteractions;
import static org.mockito.Mockito.verifyNoInteractions;

/**
* Test for {@link ReflectionUtils}.
Expand Down Expand Up @@ -198,7 +198,7 @@ void shouldReturnNullForNonGenericClass() {

// then
assertThat(result, nullValue());
verifyZeroInteractions(genericType);
verifyNoInteractions(genericType);
}

@Test
Expand Down

0 comments on commit 2f160c2

Please sign in to comment.