Skip to content
Permalink
Browse files

Remove backported MockitoJUnitRule

Mockito in third_party is updated to 1.10. We do not need to backport this rule anymore.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=237496086
  • Loading branch information...
jianglai committed Mar 8, 2019
1 parent c7be138 commit f681ec24ff8f360be7caba4c2cfce0855cbd5cab
Showing with 85 additions and 107 deletions.
  1. +1 −1 gradle/core/gradle/dependency-locks/testCompile.lockfile
  2. +1 −1 gradle/core/gradle/dependency-locks/testCompileClasspath.lockfile
  3. +1 −1 gradle/core/gradle/dependency-locks/testRuntime.lockfile
  4. +1 −1 gradle/core/gradle/dependency-locks/testRuntimeClasspath.lockfile
  5. +1 −1 gradle/dependencies.gradle
  6. +1 −1 gradle/proxy/gradle/dependency-locks/testCompile.lockfile
  7. +1 −1 gradle/proxy/gradle/dependency-locks/testCompileClasspath.lockfile
  8. +1 −1 gradle/proxy/gradle/dependency-locks/testRuntime.lockfile
  9. +1 −1 gradle/proxy/gradle/dependency-locks/testRuntimeClasspath.lockfile
  10. +1 −1 gradle/util/gradle/dependency-locks/testCompile.lockfile
  11. +1 −1 gradle/util/gradle/dependency-locks/testCompileClasspath.lockfile
  12. +1 −1 gradle/util/gradle/dependency-locks/testRuntime.lockfile
  13. +1 −1 gradle/util/gradle/dependency-locks/testRuntimeClasspath.lockfile
  14. +3 −3 java/google/registry/repositories.bzl
  15. +3 −2 javatests/google/registry/batch/AsyncTaskEnqueuerTest.java
  16. +3 −2 javatests/google/registry/batch/ResaveEntityActionTest.java
  17. +3 −2 javatests/google/registry/dns/writer/clouddns/CloudDnsWriterTest.java
  18. +3 −2 javatests/google/registry/dns/writer/dnsupdate/DnsUpdateWriterTest.java
  19. +3 −2 javatests/google/registry/export/BackupDatastoreActionTest.java
  20. +3 −2 javatests/google/registry/export/CheckBackupActionTest.java
  21. +3 −2 javatests/google/registry/export/datastore/DatastoreAdminTest.java
  22. +3 −2 javatests/google/registry/export/sheet/SyncRegistrarsSheetTest.java
  23. +3 −2 javatests/google/registry/flows/CheckApiActionTest.java
  24. +3 −2 javatests/google/registry/flows/EppControllerTest.java
  25. +3 −2 javatests/google/registry/keyring/kms/KmsConnectionImplTest.java
  26. +3 −2 javatests/google/registry/request/auth/AuthenticatedRegistrarAccessorTest.java
  27. +3 −2 javatests/google/registry/request/auth/LegacyAuthenticationMechanismTest.java
  28. +0 −45 javatests/google/registry/testing/MockitoJUnitRule.java
  29. +3 −2 javatests/google/registry/testing/mapreduce/MapreduceTestCase.java
  30. +3 −2 javatests/google/registry/tmch/NordnUploadActionTest.java
  31. +3 −2 javatests/google/registry/tmch/NordnVerifyActionTest.java
  32. +3 −2 javatests/google/registry/tmch/TmchActionTestCase.java
  33. +3 −2 javatests/google/registry/tools/AppEngineConnectionTest.java
  34. +3 −2 javatests/google/registry/tools/CommandTestCase.java
  35. +3 −2 javatests/google/registry/ui/server/registrar/ConsoleOteSetupActionTest.java
  36. +3 −2 javatests/google/registry/ui/server/registrar/ConsoleRegistrarCreatorActionTest.java
  37. +3 −2 javatests/google/registry/ui/server/registrar/RegistrarSettingsActionTestCase.java
  38. +3 −2 javatests/google/registry/util/AppEngineServiceUtilsImplTest.java
@@ -189,7 +189,7 @@ org.hamcrest:hamcrest-core:1.3
org.hamcrest:hamcrest-library:1.3
org.joda:joda-money:0.10.0
org.json:json:20160810
org.mockito:mockito-all:1.9.5
org.mockito:mockito-all:1.10.19
org.mortbay.jetty:jetty-util:6.1.26
org.mortbay.jetty:jetty:6.1.26
org.mortbay.jetty:servlet-api:2.5-20081211
@@ -184,7 +184,7 @@ org.hamcrest:hamcrest-core:1.3
org.hamcrest:hamcrest-library:1.3
org.joda:joda-money:0.10.0
org.json:json:20160810
org.mockito:mockito-all:1.9.5
org.mockito:mockito-all:1.10.19
org.mortbay.jetty:jetty-util:6.1.26
org.mortbay.jetty:jetty:6.1.26
org.mortbay.jetty:servlet-api:2.5-20081211
@@ -196,7 +196,7 @@ org.hamcrest:hamcrest-library:1.3
org.joda:joda-money:0.10.0
org.json:json:20160810
org.jvnet.staxex:stax-ex:1.7.8
org.mockito:mockito-all:1.9.5
org.mockito:mockito-all:1.10.19
org.mortbay.jetty:jetty-util:6.1.26
org.mortbay.jetty:jetty:6.1.26
org.mortbay.jetty:servlet-api:2.5-20081211
@@ -196,7 +196,7 @@ org.hamcrest:hamcrest-library:1.3
org.joda:joda-money:0.10.0
org.json:json:20160810
org.jvnet.staxex:stax-ex:1.7.8
org.mockito:mockito-all:1.9.5
org.mockito:mockito-all:1.10.19
org.mortbay.jetty:jetty-util:6.1.26
org.mortbay.jetty:jetty:6.1.26
org.mortbay.jetty:servlet-api:2.5-20081211
@@ -136,7 +136,7 @@ ext {
'org.joda:joda-money:0.10.0',
'org.json:json:20160810',
'org.khronos:opengl-api:gl1.1-android-2.1_r1',
'org.mockito:mockito-all:1.9.5',
'org.mockito:mockito-all:1.10.19',
'org.mortbay.jetty:jetty:6.1.26',
'org.mortbay.jetty:jetty-util:6.1.26',
'org.mortbay.jetty:servlet-api:2.5-20081211',
@@ -196,7 +196,7 @@ org.hamcrest:hamcrest-library:1.3
org.joda:joda-money:0.10.0
org.json:json:20160810
org.jvnet.staxex:stax-ex:1.7.8
org.mockito:mockito-all:1.9.5
org.mockito:mockito-all:1.10.19
org.mortbay.jetty:jetty-util:6.1.26
org.mortbay.jetty:jetty:6.1.26
org.mortbay.jetty:servlet-api:2.5-20081211
@@ -191,7 +191,7 @@ org.hamcrest:hamcrest-library:1.3
org.joda:joda-money:0.10.0
org.json:json:20160810
org.jvnet.staxex:stax-ex:1.7.8
org.mockito:mockito-all:1.9.5
org.mockito:mockito-all:1.10.19
org.mortbay.jetty:jetty-util:6.1.26
org.mortbay.jetty:jetty:6.1.26
org.mortbay.jetty:servlet-api:2.5-20081211
@@ -196,7 +196,7 @@ org.hamcrest:hamcrest-library:1.3
org.joda:joda-money:0.10.0
org.json:json:20160810
org.jvnet.staxex:stax-ex:1.7.8
org.mockito:mockito-all:1.9.5
org.mockito:mockito-all:1.10.19
org.mortbay.jetty:jetty-util:6.1.26
org.mortbay.jetty:jetty:6.1.26
org.mortbay.jetty:servlet-api:2.5-20081211
@@ -196,7 +196,7 @@ org.hamcrest:hamcrest-library:1.3
org.joda:joda-money:0.10.0
org.json:json:20160810
org.jvnet.staxex:stax-ex:1.7.8
org.mockito:mockito-all:1.9.5
org.mockito:mockito-all:1.10.19
org.mortbay.jetty:jetty-util:6.1.26
org.mortbay.jetty:jetty:6.1.26
org.mortbay.jetty:servlet-api:2.5-20081211
@@ -196,7 +196,7 @@ org.hamcrest:hamcrest-library:1.3
org.joda:joda-money:0.10.0
org.json:json:20160810
org.jvnet.staxex:stax-ex:1.7.8
org.mockito:mockito-all:1.9.5
org.mockito:mockito-all:1.10.19
org.mortbay.jetty:jetty-util:6.1.26
org.mortbay.jetty:jetty:6.1.26
org.mortbay.jetty:servlet-api:2.5-20081211
@@ -191,7 +191,7 @@ org.hamcrest:hamcrest-library:1.3
org.joda:joda-money:0.10.0
org.json:json:20160810
org.jvnet.staxex:stax-ex:1.7.8
org.mockito:mockito-all:1.9.5
org.mockito:mockito-all:1.10.19
org.mortbay.jetty:jetty-util:6.1.26
org.mortbay.jetty:jetty:6.1.26
org.mortbay.jetty:servlet-api:2.5-20081211
@@ -196,7 +196,7 @@ org.hamcrest:hamcrest-library:1.3
org.joda:joda-money:0.10.0
org.json:json:20160810
org.jvnet.staxex:stax-ex:1.7.8
org.mockito:mockito-all:1.9.5
org.mockito:mockito-all:1.10.19
org.mortbay.jetty:jetty-util:6.1.26
org.mortbay.jetty:jetty:6.1.26
org.mortbay.jetty:servlet-api:2.5-20081211
@@ -196,7 +196,7 @@ org.hamcrest:hamcrest-library:1.3
org.joda:joda-money:0.10.0
org.json:json:20160810
org.jvnet.staxex:stax-ex:1.7.8
org.mockito:mockito-all:1.9.5
org.mockito:mockito-all:1.10.19
org.mortbay.jetty:jetty-util:6.1.26
org.mortbay.jetty:jetty:6.1.26
org.mortbay.jetty:servlet-api:2.5-20081211
@@ -2498,10 +2498,10 @@ def org_khronos_opengl_api():
def org_mockito_all():
java_import_external(
name = "org_mockito_all",
jar_sha256 = "b2a63307d1dce3aa1623fdaacb2327a4cd7795b0066f31bf542b1e8f2683239e",
jar_sha256 = "d1a7a7ef14b3db5c0fc3e0a63a81b374b510afe85add9f7984b97911f4c70605",
jar_urls = [
"http://maven.ibiblio.org/maven2/org/mockito/mockito-all/1.9.5/mockito-all-1.9.5.jar",
"http://repo1.maven.org/maven2/org/mockito/mockito-all/1.9.5/mockito-all-1.9.5.jar",
"http://maven.ibiblio.org/maven2/org/mockito/mockito-all/1.10.19/mockito-all-1.10.19.jar",
"http://repo1.maven.org/maven2/org/mockito/mockito-all/1.10.19/mockito-all-1.10.19.jar",
],
licenses = ["notice"], # The MIT License
testonly_ = True,
@@ -39,7 +39,6 @@
import google.registry.testing.FakeClock;
import google.registry.testing.FakeSleeper;
import google.registry.testing.InjectRule;
import google.registry.testing.MockitoJUnitRule;
import google.registry.testing.ShardableTestCase;
import google.registry.testing.TaskQueueHelper.TaskMatcher;
import google.registry.util.AppEngineServiceUtils;
@@ -53,6 +52,8 @@
import org.junit.runner.RunWith;
import org.junit.runners.JUnit4;
import org.mockito.Mock;
import org.mockito.junit.MockitoJUnit;
import org.mockito.junit.MockitoRule;

/** Unit tests for {@link AsyncTaskEnqueuer}. */
@RunWith(JUnit4.class)
@@ -64,7 +65,7 @@

@Rule public final InjectRule inject = new InjectRule();

@Rule public final MockitoJUnitRule mocks = MockitoJUnitRule.create();
@Rule public final MockitoRule mocks = MockitoJUnit.rule();

@Mock private AppEngineServiceUtils appEngineServiceUtils;

@@ -49,7 +49,6 @@
import google.registry.testing.FakeClock;
import google.registry.testing.FakeSleeper;
import google.registry.testing.InjectRule;
import google.registry.testing.MockitoJUnitRule;
import google.registry.testing.ShardableTestCase;
import google.registry.testing.TaskQueueHelper.TaskMatcher;
import google.registry.util.AppEngineServiceUtils;
@@ -62,6 +61,8 @@
import org.junit.runner.RunWith;
import org.junit.runners.JUnit4;
import org.mockito.Mock;
import org.mockito.junit.MockitoJUnit;
import org.mockito.junit.MockitoRule;

/** Unit tests for {@link ResaveEntityAction}. */
@RunWith(JUnit4.class)
@@ -72,7 +73,7 @@
AppEngineRule.builder().withDatastore().withTaskQueue().build();

@Rule public final InjectRule inject = new InjectRule();
@Rule public final MockitoJUnitRule mocks = MockitoJUnitRule.create();
@Rule public final MockitoRule mocks = MockitoJUnit.rule();

@Mock private AppEngineServiceUtils appEngineServiceUtils;
@Mock private Response response;
@@ -45,7 +45,6 @@
import google.registry.model.eppcommon.StatusValue;
import google.registry.model.host.HostResource;
import google.registry.testing.AppEngineRule;
import google.registry.testing.MockitoJUnitRule;
import google.registry.util.Retrier;
import google.registry.util.SystemClock;
import google.registry.util.SystemSleeper;
@@ -63,13 +62,15 @@
import org.mockito.Captor;
import org.mockito.Matchers;
import org.mockito.Mock;
import org.mockito.junit.MockitoJUnit;
import org.mockito.junit.MockitoRule;

/** Test case for {@link CloudDnsWriter}. */
@RunWith(JUnit4.class)
public class CloudDnsWriterTest {

@Rule public final AppEngineRule appEngine = AppEngineRule.builder().withDatastore().build();
@Rule public final MockitoJUnitRule mocks = MockitoJUnitRule.create();
@Rule public final MockitoRule mocks = MockitoJUnit.rule();

private static final Inet4Address IPv4 = (Inet4Address) InetAddresses.forString("127.0.0.1");
private static final Inet6Address IPv6 = (Inet6Address) InetAddresses.forString("::1");
@@ -45,7 +45,6 @@
import google.registry.testing.AppEngineRule;
import google.registry.testing.FakeClock;
import google.registry.testing.InjectRule;
import google.registry.testing.MockitoJUnitRule;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Iterator;
@@ -59,6 +58,8 @@
import org.mockito.ArgumentCaptor;
import org.mockito.Captor;
import org.mockito.Mock;
import org.mockito.junit.MockitoJUnit;
import org.mockito.junit.MockitoRule;
import org.xbill.DNS.Flags;
import org.xbill.DNS.Message;
import org.xbill.DNS.Opcode;
@@ -77,7 +78,7 @@
public final AppEngineRule appEngine =
AppEngineRule.builder().withDatastore().withTaskQueue().build();

@Rule public final MockitoJUnitRule mocks = MockitoJUnitRule.create();
@Rule public final MockitoRule mocks = MockitoJUnit.rule();
@Rule public final InjectRule inject = new InjectRule();

@Mock private DnsMessageTransport mockResolver;
@@ -26,21 +26,22 @@
import google.registry.export.datastore.Operation;
import google.registry.testing.AppEngineRule;
import google.registry.testing.FakeResponse;
import google.registry.testing.MockitoJUnitRule;
import google.registry.testing.TaskQueueHelper.TaskMatcher;
import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.JUnit4;
import org.mockito.Mock;
import org.mockito.junit.MockitoJUnit;
import org.mockito.junit.MockitoRule;

/** Unit tests for {@link BackupDatastoreAction}. */
@RunWith(JUnit4.class)
public class BackupDatastoreActionTest {

@Rule public final AppEngineRule appEngine = AppEngineRule.builder().withTaskQueue().build();
@Rule public final MockitoJUnitRule mocks = MockitoJUnitRule.create();
@Rule public final MockitoRule mocks = MockitoJUnit.rule();

@Mock private DatastoreAdmin datastoreAdmin;
@Mock private Export exportRequest;
@@ -38,7 +38,6 @@
import google.registry.testing.AppEngineRule;
import google.registry.testing.FakeClock;
import google.registry.testing.FakeResponse;
import google.registry.testing.MockitoJUnitRule;
import google.registry.testing.TaskQueueHelper.TaskMatcher;
import google.registry.testing.TestDataHelper;
import org.joda.time.DateTime;
@@ -49,6 +48,8 @@
import org.junit.runner.RunWith;
import org.junit.runners.JUnit4;
import org.mockito.Mock;
import org.mockito.junit.MockitoJUnit;
import org.mockito.junit.MockitoRule;

/** Unit tests for {@link CheckBackupAction}. */
@RunWith(JUnit4.class)
@@ -60,7 +61,7 @@
static final JsonFactory JSON_FACTORY = JacksonFactory.getDefaultInstance();

@Rule public final AppEngineRule appEngine = AppEngineRule.builder().withTaskQueue().build();
@Rule public final MockitoJUnitRule mocks = MockitoJUnitRule.create();
@Rule public final MockitoRule mocks = MockitoJUnit.rule();

@Mock private DatastoreAdmin datastoreAdmin;
@Mock private Get getNotFoundBackupProgressRequest;
@@ -24,7 +24,6 @@
import com.google.api.client.http.javanet.NetHttpTransport;
import com.google.api.client.json.jackson2.JacksonFactory;
import com.google.common.collect.ImmutableList;
import google.registry.testing.MockitoJUnitRule;
import google.registry.testing.TestDataHelper;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
@@ -35,6 +34,8 @@
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.JUnit4;
import org.mockito.junit.MockitoJUnit;
import org.mockito.junit.MockitoRule;

/** Unit tests for {@link DatastoreAdmin}. */
@RunWith(JUnit4.class)
@@ -45,7 +46,7 @@
private static final ImmutableList<String> KINDS =
ImmutableList.of("Registry", "Registrar", "DomainBase");

@Rule public final MockitoJUnitRule mocks = MockitoJUnitRule.create();
@Rule public final MockitoRule mocks = MockitoJUnit.rule();

private HttpTransport httpTransport;
private GoogleCredential googleCredential;
@@ -42,7 +42,6 @@
import google.registry.testing.DatastoreHelper;
import google.registry.testing.FakeClock;
import google.registry.testing.InjectRule;
import google.registry.testing.MockitoJUnitRule;
import org.joda.time.DateTime;
import org.junit.Before;
import org.junit.Rule;
@@ -52,13 +51,15 @@
import org.mockito.ArgumentCaptor;
import org.mockito.Captor;
import org.mockito.Mock;
import org.mockito.junit.MockitoJUnit;
import org.mockito.junit.MockitoRule;

/** Unit tests for {@link SyncRegistrarsSheet}. */
@RunWith(JUnit4.class)
public class SyncRegistrarsSheetTest {

@Rule public final AppEngineRule appEngine = AppEngineRule.builder().withDatastore().build();
@Rule public final MockitoJUnitRule mocks = MockitoJUnitRule.create();
@Rule public final MockitoRule mocks = MockitoJUnit.rule();
@Rule public final InjectRule inject = new InjectRule();

@Captor private ArgumentCaptor<ImmutableList<ImmutableMap<String, String>>> rowsCaptor;
@@ -36,7 +36,6 @@
import google.registry.testing.AppEngineRule;
import google.registry.testing.FakeClock;
import google.registry.testing.FakeResponse;
import google.registry.testing.MockitoJUnitRule;
import java.util.Map;
import org.joda.time.DateTime;
import org.json.simple.JSONValue;
@@ -48,6 +47,8 @@
import org.mockito.ArgumentCaptor;
import org.mockito.Captor;
import org.mockito.Mock;
import org.mockito.junit.MockitoJUnit;
import org.mockito.junit.MockitoRule;

/** Tests for {@link CheckApiAction}. */
@RunWith(JUnit4.class)
@@ -56,7 +57,7 @@
private static final DateTime START_TIME = DateTime.parse("2000-01-01T00:00:00.0Z");

@Rule public final AppEngineRule appEngine = AppEngineRule.builder().withDatastore().build();
@Rule public final MockitoJUnitRule mocks = MockitoJUnitRule.create();
@Rule public final MockitoRule mocks = MockitoJUnit.rule();

@Mock private CheckApiMetrics checkApiMetrics;
@Captor private ArgumentCaptor<CheckApiMetric> metricCaptor;
@@ -42,7 +42,6 @@
import google.registry.monitoring.whitebox.EppMetric;
import google.registry.testing.AppEngineRule;
import google.registry.testing.FakeClock;
import google.registry.testing.MockitoJUnitRule;
import google.registry.testing.ShardableTestCase;
import google.registry.util.Clock;
import google.registry.xml.ValidationMode;
@@ -60,13 +59,15 @@
import org.junit.runners.JUnit4;
import org.mockito.Matchers;
import org.mockito.Mock;
import org.mockito.junit.MockitoJUnit;
import org.mockito.junit.MockitoRule;

/** Unit tests for {@link EppController}. */
@RunWith(JUnit4.class)
public class EppControllerTest extends ShardableTestCase {

@Rule public AppEngineRule appEngineRule = new AppEngineRule.Builder().withDatastore().build();
@Rule public final MockitoJUnitRule mocks = MockitoJUnitRule.create();
@Rule public final MockitoRule mocks = MockitoJUnit.rule();

@Mock SessionMetadata sessionMetadata;
@Mock TransportCredentials transportCredentials;
Oops, something went wrong.

0 comments on commit f681ec2

Please sign in to comment.
You can’t perform that action at this time.