Skip to content

Commit

Permalink
chore: remove usage of deprecated matcher and verifyZeroInteractions …
Browse files Browse the repository at this point in the history
…of mockito (googleapis#19)
  • Loading branch information
athakor committed Mar 16, 2020
1 parent cd4a48b commit 9b33637
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
Expand Up @@ -17,12 +17,12 @@
package com.google.cloud.storage.contrib.nio;

import static com.google.common.truth.Truth.assertThat;
import static org.mockito.Matchers.any;
import static org.mockito.Matchers.eq;
import static org.mockito.ArgumentMatchers.any;
import static org.mockito.ArgumentMatchers.eq;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.times;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.verifyZeroInteractions;
import static org.mockito.Mockito.verifyNoMoreInteractions;
import static org.mockito.Mockito.when;

import com.google.cloud.ReadChannel;
Expand Down Expand Up @@ -174,7 +174,7 @@ public void testIsOpen() throws IOException {
public void testSize() throws IOException {
assertThat(chan.size()).isEqualTo(42L);
verify(gcsChannel).isOpen();
verifyZeroInteractions(gcsChannel);
verifyNoMoreInteractions(gcsChannel);
}

@Test
Expand Down
Expand Up @@ -17,13 +17,12 @@
package com.google.cloud.storage.contrib.nio;

import static com.google.common.truth.Truth.assertThat;
import static org.mockito.Matchers.any;
import static org.mockito.Matchers.eq;
import static org.mockito.ArgumentMatchers.any;
import static org.mockito.ArgumentMatchers.eq;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.times;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.verifyNoMoreInteractions;
import static org.mockito.Mockito.verifyZeroInteractions;
import static org.mockito.Mockito.when;

import com.google.cloud.WriteChannel;
Expand Down Expand Up @@ -95,7 +94,7 @@ public void testIsOpen() throws IOException {
public void testSize() throws IOException {
assertThat(chan.size()).isEqualTo(0L);
verify(gcsChannel).isOpen();
verifyZeroInteractions(gcsChannel);
verifyNoMoreInteractions(gcsChannel);
}

@Test
Expand Down

0 comments on commit 9b33637

Please sign in to comment.