mirror of
https://github.com/google/nomulus.git
synced 2025-05-13 07:57:13 +02:00
Allow third_party/java_src/gtld/ to use :mockito2_for_third_party
In [] a change would have been made to your project that is incompatible with your open source integration. To make sure the open source variant of your project remains working, we have eagerly updated your open source copy to use Mockito 2. This CL integrates that change into []. Please read []and understand the consequences of this change. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=238445356
This commit is contained in:
parent
1a6c068471
commit
202ed9db6a
70 changed files with 200 additions and 199 deletions
|
@ -16,7 +16,7 @@ package google.registry.util;
|
|||
|
||||
import static com.google.common.truth.Truth.assertThat;
|
||||
import static google.registry.testing.LogsSubject.assertAboutLogs;
|
||||
import static org.mockito.Matchers.argThat;
|
||||
import static org.mockito.ArgumentMatchers.argThat;
|
||||
import static org.mockito.Mockito.mock;
|
||||
import static org.mockito.Mockito.when;
|
||||
|
||||
|
@ -35,7 +35,6 @@ import org.junit.Rule;
|
|||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.junit.runners.JUnit4;
|
||||
import org.mockito.ArgumentMatcher;
|
||||
|
||||
/** Unit tests for {@link RequestStatusCheckerImpl}. */
|
||||
@RunWith(JUnit4.class)
|
||||
|
@ -53,16 +52,12 @@ public final class RequestStatusCheckerImplTest {
|
|||
*/
|
||||
private static LogQuery expectedLogQuery(final String requestLogId) {
|
||||
return argThat(
|
||||
new ArgumentMatcher<LogQuery>() {
|
||||
@Override
|
||||
public boolean matches(Object object) {
|
||||
assertThat(object).isInstanceOf(LogQuery.class);
|
||||
LogQuery logQuery = (LogQuery) object;
|
||||
assertThat(logQuery.getRequestIds()).containsExactly(requestLogId);
|
||||
assertThat(logQuery.getIncludeAppLogs()).isFalse();
|
||||
assertThat(logQuery.getIncludeIncomplete()).isTrue();
|
||||
return true;
|
||||
}
|
||||
object -> {
|
||||
assertThat(object).isInstanceOf(LogQuery.class);
|
||||
assertThat(object.getRequestIds()).containsExactly(requestLogId);
|
||||
assertThat(object.getIncludeAppLogs()).isFalse();
|
||||
assertThat(object.getIncludeIncomplete()).isTrue();
|
||||
return true;
|
||||
});
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue