mirror of
https://github.com/google/nomulus.git
synced 2025-05-14 00:17:20 +02:00
Scope down lastTransferTime to only ContactResource, DomainResource
and HostResource. DomainApplication is not transferable and has no need for this field. HostResource needs it because it can be transferred with a domain. This is all in service of removing the ofy().load() inside of host's cloneProjectedAtTime. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=139346925
This commit is contained in:
parent
5368489987
commit
fdc8ceb6bb
15 changed files with 121 additions and 56 deletions
|
@ -20,6 +20,8 @@ import static com.google.common.truth.Truth.assertAbout;
|
|||
import com.google.common.truth.AbstractVerb.DelegatedVerb;
|
||||
import com.google.common.truth.FailureStrategy;
|
||||
import google.registry.model.host.HostResource;
|
||||
import google.registry.testing.TruthChainer.And;
|
||||
import org.joda.time.DateTime;
|
||||
|
||||
/** Truth subject for asserting things about {@link HostResource} instances. */
|
||||
public final class HostResourceSubject
|
||||
|
@ -36,4 +38,18 @@ public final class HostResourceSubject
|
|||
public static DelegatedVerb<HostResourceSubject, HostResource> assertAboutHosts() {
|
||||
return assertAbout(new SubjectFactory());
|
||||
}
|
||||
|
||||
public And<HostResourceSubject> hasLastTransferTime(DateTime lastTransferTime) {
|
||||
return hasValue(
|
||||
lastTransferTime,
|
||||
actual().getLastTransferTime(),
|
||||
"has lastTransferTime");
|
||||
}
|
||||
|
||||
public And<HostResourceSubject> hasLastTransferTimeNotEqualTo(DateTime lastTransferTime) {
|
||||
return doesNotHaveValue(
|
||||
lastTransferTime,
|
||||
actual().getLastTransferTime(),
|
||||
"lastTransferTime");
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue