mirror of
https://github.com/google/nomulus.git
synced 2025-05-14 00:17:20 +02:00
Improve handling of lastSubordinateChange and beef up tests
See [] for the comments that led to this. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=147796087
This commit is contained in:
parent
be30ecdf66
commit
c23bbe35bb
5 changed files with 159 additions and 124 deletions
|
@ -19,6 +19,8 @@ import static com.google.common.truth.Truth.assertAbout;
|
|||
|
||||
import com.google.common.truth.AbstractVerb.DelegatedVerb;
|
||||
import com.google.common.truth.FailureStrategy;
|
||||
import com.googlecode.objectify.Key;
|
||||
import google.registry.model.domain.DomainResource;
|
||||
import google.registry.model.host.HostResource;
|
||||
import google.registry.testing.TruthChainer.And;
|
||||
import org.joda.time.DateTime;
|
||||
|
@ -52,4 +54,18 @@ public final class HostResourceSubject
|
|||
actual().getLastTransferTime(),
|
||||
"lastTransferTime");
|
||||
}
|
||||
|
||||
public And<HostResourceSubject> hasLastSuperordinateChange(DateTime lastSuperordinateChange) {
|
||||
return hasValue(
|
||||
lastSuperordinateChange,
|
||||
actual().getLastSuperordinateChange(),
|
||||
"has lastSuperordinateChange");
|
||||
}
|
||||
|
||||
public And<HostResourceSubject> hasSuperordinateDomain(Key<DomainResource> superordinateDomain) {
|
||||
return hasValue(
|
||||
superordinateDomain,
|
||||
actual().getSuperordinateDomain(),
|
||||
"has superordinateDomain");
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue