mirror of
https://github.com/google/nomulus
synced 2026-09-06 08:07:03 +00: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:
@@ -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");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user