mirror of
https://github.com/google/nomulus.git
synced 2025-06-30 00:03:37 +02:00
Migrate from old *Verb* classes to new *SubjectBuilder* classes
This migration does not change any behavior. More information: [] ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=168248439
This commit is contained in:
parent
985d14b51f
commit
211d89695a
9 changed files with 22 additions and 19 deletions
|
@ -1134,10 +1134,10 @@ def com_google_re2j():
|
|||
def com_google_truth():
|
||||
java_import_external(
|
||||
name = "com_google_truth",
|
||||
jar_sha256 = "772bfaccd05b9203f929536def0b4157094130629bc105d555bef8eacc3c1675",
|
||||
jar_sha256 = "e087f1a50e40e8aae1f0cdb7f031684a84e7dd7ca224a4b5be53caeacf0f0324",
|
||||
jar_urls = [
|
||||
"http://domain-registry-maven.storage.googleapis.com/repo1.maven.org/maven2/com/google/truth/truth/0.34/truth-0.34.jar",
|
||||
"http://repo1.maven.org/maven2/com/google/truth/truth/0.34/truth-0.34.jar",
|
||||
"http://domain-registry-maven.storage.googleapis.com/repo1.maven.org/maven2/com/google/truth/truth/0.35/truth-0.35.jar",
|
||||
"http://repo1.maven.org/maven2/com/google/truth/truth/0.35/truth-0.35.jar",
|
||||
],
|
||||
licenses = ["notice"], # The Apache Software License, Version 2.0
|
||||
testonly_ = True,
|
||||
|
|
|
@ -17,8 +17,8 @@ package google.registry.testing;
|
|||
import static com.google.common.base.Preconditions.checkNotNull;
|
||||
import static com.google.common.truth.Truth.assertAbout;
|
||||
|
||||
import com.google.common.truth.AbstractVerb.DelegatedVerb;
|
||||
import com.google.common.truth.FailureStrategy;
|
||||
import com.google.common.truth.SimpleSubjectBuilder;
|
||||
import google.registry.model.contact.ContactResource;
|
||||
import google.registry.model.contact.PostalInfo;
|
||||
import google.registry.model.eppcommon.AuthInfo;
|
||||
|
@ -183,7 +183,8 @@ public final class ContactResourceSubject
|
|||
"has currentSponsorClientId");
|
||||
}
|
||||
|
||||
public static DelegatedVerb<ContactResourceSubject, ContactResource> assertAboutContacts() {
|
||||
public static SimpleSubjectBuilder<ContactResourceSubject, ContactResource>
|
||||
assertAboutContacts() {
|
||||
return assertAbout(new SubjectFactory());
|
||||
}
|
||||
}
|
||||
|
|
|
@ -19,8 +19,8 @@ import static com.google.common.truth.Truth.assertAbout;
|
|||
import static com.google.common.truth.Truth.assertThat;
|
||||
|
||||
import com.google.common.collect.ImmutableSet;
|
||||
import com.google.common.truth.AbstractVerb.DelegatedVerb;
|
||||
import com.google.common.truth.FailureStrategy;
|
||||
import com.google.common.truth.SimpleSubjectBuilder;
|
||||
import google.registry.model.domain.DomainApplication;
|
||||
import google.registry.model.domain.Period;
|
||||
import google.registry.model.domain.launch.ApplicationStatus;
|
||||
|
@ -84,7 +84,7 @@ public final class DomainApplicationSubject
|
|||
super(strategy, checkNotNull(subject));
|
||||
}
|
||||
|
||||
public static DelegatedVerb<DomainApplicationSubject, DomainApplication>
|
||||
public static SimpleSubjectBuilder<DomainApplicationSubject, DomainApplication>
|
||||
assertAboutApplications() {
|
||||
return assertAbout(new SubjectFactory());
|
||||
}
|
||||
|
|
|
@ -17,8 +17,8 @@ package google.registry.testing;
|
|||
import static com.google.common.base.Preconditions.checkNotNull;
|
||||
import static com.google.common.truth.Truth.assertAbout;
|
||||
|
||||
import com.google.common.truth.AbstractVerb.DelegatedVerb;
|
||||
import com.google.common.truth.FailureStrategy;
|
||||
import com.google.common.truth.SimpleSubjectBuilder;
|
||||
import google.registry.model.domain.DomainResource;
|
||||
import google.registry.model.transfer.TransferStatus;
|
||||
import google.registry.testing.TruthChainer.And;
|
||||
|
@ -115,7 +115,7 @@ public final class DomainResourceSubject
|
|||
super(strategy, checkNotNull(subject));
|
||||
}
|
||||
|
||||
public static DelegatedVerb<DomainResourceSubject, DomainResource> assertAboutDomains() {
|
||||
public static SimpleSubjectBuilder<DomainResourceSubject, DomainResource> assertAboutDomains() {
|
||||
return assertAbout(new SubjectFactory());
|
||||
}
|
||||
}
|
||||
|
|
|
@ -18,8 +18,8 @@ import static com.google.common.truth.Truth.assertAbout;
|
|||
import static com.google.common.truth.Truth.assertThat;
|
||||
import static google.registry.flows.EppXmlTransformer.marshal;
|
||||
|
||||
import com.google.common.truth.AbstractVerb.DelegatedVerb;
|
||||
import com.google.common.truth.FailureStrategy;
|
||||
import com.google.common.truth.SimpleSubjectBuilder;
|
||||
import com.google.common.truth.Subject;
|
||||
import com.google.common.truth.SubjectFactory;
|
||||
import google.registry.flows.EppException;
|
||||
|
@ -57,7 +57,7 @@ public class EppExceptionSubject extends Subject<EppExceptionSubject, EppExcepti
|
|||
return new And<>(this);
|
||||
}
|
||||
|
||||
public static DelegatedVerb<EppExceptionSubject, EppException> assertAboutEppExceptions() {
|
||||
public static SimpleSubjectBuilder<EppExceptionSubject, EppException> assertAboutEppExceptions() {
|
||||
return assertAbout(new SubjectFactory<EppExceptionSubject, EppException>() {
|
||||
@Override
|
||||
public EppExceptionSubject getSubject(FailureStrategy strategy, EppException subject) {
|
||||
|
|
|
@ -17,8 +17,8 @@ package google.registry.testing;
|
|||
import static com.google.common.base.Preconditions.checkNotNull;
|
||||
import static com.google.common.truth.Truth.assertAbout;
|
||||
|
||||
import com.google.common.truth.AbstractVerb.DelegatedVerb;
|
||||
import com.google.common.truth.FailureStrategy;
|
||||
import com.google.common.truth.SimpleSubjectBuilder;
|
||||
import com.google.common.truth.SubjectFactory;
|
||||
import google.registry.model.EppResource;
|
||||
|
||||
|
@ -39,7 +39,8 @@ public final class GenericEppResourceSubject
|
|||
super(strategy, checkNotNull(subject));
|
||||
}
|
||||
|
||||
public static DelegatedVerb<GenericEppResourceSubject, EppResource> assertAboutEppResources() {
|
||||
public static SimpleSubjectBuilder<GenericEppResourceSubject, EppResource>
|
||||
assertAboutEppResources() {
|
||||
return assertAbout(new GenericEppResourceSubjectFactory());
|
||||
}
|
||||
}
|
||||
|
|
|
@ -17,8 +17,8 @@ package google.registry.testing;
|
|||
import static com.google.common.truth.Truth.assertAbout;
|
||||
|
||||
import com.google.common.base.Optional;
|
||||
import com.google.common.truth.AbstractVerb.DelegatedVerb;
|
||||
import com.google.common.truth.FailureStrategy;
|
||||
import com.google.common.truth.SimpleSubjectBuilder;
|
||||
import com.google.common.truth.Subject;
|
||||
import google.registry.model.domain.Period;
|
||||
import google.registry.model.reporting.HistoryEntry;
|
||||
|
@ -103,7 +103,8 @@ public class HistoryEntrySubject extends Subject<HistoryEntrySubject, HistoryEnt
|
|||
return new And<>(this);
|
||||
}
|
||||
|
||||
public static DelegatedVerb<HistoryEntrySubject, HistoryEntry> assertAboutHistoryEntries() {
|
||||
public static SimpleSubjectBuilder<HistoryEntrySubject, HistoryEntry>
|
||||
assertAboutHistoryEntries() {
|
||||
return assertAbout(new SubjectFactory());
|
||||
}
|
||||
}
|
||||
|
|
|
@ -17,8 +17,8 @@ package google.registry.testing;
|
|||
import static com.google.common.base.Preconditions.checkNotNull;
|
||||
import static com.google.common.truth.Truth.assertAbout;
|
||||
|
||||
import com.google.common.truth.AbstractVerb.DelegatedVerb;
|
||||
import com.google.common.truth.FailureStrategy;
|
||||
import com.google.common.truth.SimpleSubjectBuilder;
|
||||
import com.googlecode.objectify.Key;
|
||||
import google.registry.model.domain.DomainResource;
|
||||
import google.registry.model.host.HostResource;
|
||||
|
@ -37,7 +37,7 @@ public final class HostResourceSubject
|
|||
super(strategy, checkNotNull(subject));
|
||||
}
|
||||
|
||||
public static DelegatedVerb<HostResourceSubject, HostResource> assertAboutHosts() {
|
||||
public static SimpleSubjectBuilder<HostResourceSubject, HostResource> assertAboutHosts() {
|
||||
return assertAbout(new SubjectFactory());
|
||||
}
|
||||
|
||||
|
|
|
@ -19,9 +19,9 @@ import static com.google.common.truth.Truth.assertThat;
|
|||
|
||||
import com.google.common.collect.ImmutableList;
|
||||
import com.google.common.testing.TestLogHandler;
|
||||
import com.google.common.truth.AbstractVerb.DelegatedVerb;
|
||||
import com.google.common.truth.Correspondence;
|
||||
import com.google.common.truth.FailureStrategy;
|
||||
import com.google.common.truth.SimpleSubjectBuilder;
|
||||
import com.google.common.truth.StringSubject;
|
||||
import com.google.common.truth.Subject;
|
||||
import google.registry.testing.TruthChainer.Which;
|
||||
|
@ -87,7 +87,7 @@ public class LogsSubject extends Subject<LogsSubject, TestLogHandler> {
|
|||
throw new AssertionError("Message check passed yet matching message not found");
|
||||
}
|
||||
|
||||
public static DelegatedVerb<LogsSubject, TestLogHandler> assertAboutLogs() {
|
||||
public static SimpleSubjectBuilder<LogsSubject, TestLogHandler> assertAboutLogs() {
|
||||
return assertAbout(new SubjectFactory());
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue