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:
cgoldfeder 2016-11-15 08:03:25 -08:00 committed by Ben McIlwain
parent 0234795240
commit 84009eaccb
24 changed files with 309 additions and 240 deletions

View file

@ -43,7 +43,6 @@ import google.registry.flows.ResourceFlowUtils.ResourceDoesNotExistException;
import google.registry.flows.ResourceFlowUtils.ResourceNotOwnedException;
import google.registry.flows.domain.DomainFlowUtils.NotAuthorizedForTldException;
import google.registry.flows.exceptions.NotPendingTransferException;
import google.registry.model.EppResource;
import google.registry.model.billing.BillingEvent;
import google.registry.model.billing.BillingEvent.Cancellation;
import google.registry.model.billing.BillingEvent.Cancellation.Builder;
@ -98,8 +97,8 @@ public class DomainTransferApproveFlowTest
clock.advanceOneMilli();
}
private void assertTransferApproved(EppResource resource) {
assertAboutEppResources().that(resource)
private void assertTransferApproved(DomainResource domain) {
assertAboutDomains().that(domain)
.hasTransferStatus(TransferStatus.CLIENT_APPROVED).and()
.hasCurrentSponsorClientId("NewRegistrar").and()
.hasLastTransferTime(clock.nowUtc()).and()
@ -107,6 +106,13 @@ public class DomainTransferApproveFlowTest
.doesNotHaveStatusValue(StatusValue.PENDING_TRANSFER);
}
private void assertTransferApproved(HostResource host) {
assertAboutEppResources().that(host)
.hasCurrentSponsorClientId("NewRegistrar").and()
.hasLastTransferTime(clock.nowUtc()).and()
.doesNotHaveStatusValue(StatusValue.PENDING_TRANSFER);
}
private void setEppLoader(String commandFilename) {
setEppInput(commandFilename);
// Replace the ROID in the xml file with the one generated in our test.