mirror of
https://github.com/google/nomulus.git
synced 2025-05-28 16:30:12 +02:00
Scope down TransferData to only ContactResource and DomainResource
HostResource and DomainApplication are not transferable, (or at least, not directly in the case of hosts) and have no need for the TransferData field. In a flat-flow world, we can push it down to where it's actually used. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=139201423
This commit is contained in:
parent
0234795240
commit
84009eaccb
24 changed files with 309 additions and 240 deletions
|
@ -26,7 +26,6 @@ import com.google.common.truth.Subject;
|
|||
import google.registry.model.EppResource;
|
||||
import google.registry.model.eppcommon.StatusValue;
|
||||
import google.registry.model.reporting.HistoryEntry;
|
||||
import google.registry.model.transfer.TransferStatus;
|
||||
import google.registry.testing.TruthChainer.And;
|
||||
import google.registry.testing.TruthChainer.Which;
|
||||
import java.util.List;
|
||||
|
@ -194,41 +193,6 @@ abstract class AbstractEppResourceSubject
|
|||
"has currentSponsorClientId");
|
||||
}
|
||||
|
||||
public And<S> hasTransferStatus(TransferStatus transferStatus) {
|
||||
return hasValue(
|
||||
transferStatus,
|
||||
actual().getTransferData().getTransferStatus(),
|
||||
"has transferStatus");
|
||||
}
|
||||
|
||||
public And<S> hasTransferRequestClientTrid(String clTrid) {
|
||||
return hasValue(
|
||||
clTrid,
|
||||
actual().getTransferData().getTransferRequestTrid().getClientTransactionId(),
|
||||
"has trid");
|
||||
}
|
||||
|
||||
public And<S> hasPendingTransferExpirationTime(DateTime pendingTransferExpirationTime) {
|
||||
return hasValue(
|
||||
pendingTransferExpirationTime,
|
||||
actual().getTransferData().getPendingTransferExpirationTime(),
|
||||
"has pendingTransferExpirationTime");
|
||||
}
|
||||
|
||||
public And<S> hasTransferGainingClientId(String gainingClientId) {
|
||||
return hasValue(
|
||||
gainingClientId,
|
||||
actual().getTransferData().getGainingClientId(),
|
||||
"has transfer ga");
|
||||
}
|
||||
|
||||
public And<S> hasTransferLosingClientId(String losingClientId) {
|
||||
return hasValue(
|
||||
losingClientId,
|
||||
actual().getTransferData().getLosingClientId(),
|
||||
"has transfer losingClientId");
|
||||
}
|
||||
|
||||
public And<S> isActiveAt(DateTime time) {
|
||||
if (!isActive(actual(), time)) {
|
||||
fail("is active at " + time);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue