mirror of
https://github.com/google/nomulus.git
synced 2025-05-13 07:57:13 +02:00
Migrate getCreatePrice() call to DomainPricingLogic
Swap all calls to TldSpecificLogicProxy.getCreatePrice() to the counterpart in DomainPricingLogic. Also makes necessary changes for testing to work, including fake implementations of DomainPricingCustomLogic and DomainCreateLofwCustomLogic. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=140754334
This commit is contained in:
parent
f8b4c9eddb
commit
79a72387ee
15 changed files with 379 additions and 44 deletions
|
@ -109,13 +109,13 @@ import google.registry.model.billing.BillingEvent.Reason;
|
|||
import google.registry.model.domain.DomainResource;
|
||||
import google.registry.model.domain.GracePeriod;
|
||||
import google.registry.model.domain.LrpTokenEntity;
|
||||
import google.registry.model.domain.TestExtraLogicManager;
|
||||
import google.registry.model.domain.TestExtraLogicManager.TestExtraLogicManagerSuccessException;
|
||||
import google.registry.model.domain.launch.ApplicationStatus;
|
||||
import google.registry.model.domain.launch.LaunchNotice;
|
||||
import google.registry.model.domain.rgp.GracePeriodStatus;
|
||||
import google.registry.model.domain.secdns.DelegationSignerData;
|
||||
import google.registry.model.eppcommon.StatusValue;
|
||||
import google.registry.model.eppoutput.CreateData.DomainCreateData;
|
||||
import google.registry.model.eppoutput.EppOutput;
|
||||
import google.registry.model.registrar.Registrar;
|
||||
import google.registry.model.registry.Registry;
|
||||
import google.registry.model.registry.Registry.TldState;
|
||||
|
@ -151,7 +151,6 @@ public class DomainCreateFlowTest extends ResourceFlowTestCase<DomainCreateFlow,
|
|||
"anchor,RESERVED_FOR_ANCHOR_TENANT,2fooBAR"))
|
||||
.build());
|
||||
persistClaimsList(ImmutableMap.of("example-one", CLAIMS_KEY));
|
||||
RegistryExtraFlowLogicProxy.setOverride("flags", TestExtraLogicManager.class);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1710,7 +1709,9 @@ public class DomainCreateFlowTest extends ResourceFlowTestCase<DomainCreateFlow,
|
|||
public void testSuccess_flags() throws Exception {
|
||||
persistContactsAndHosts();
|
||||
setEppInput("domain_create_flags.xml", ImmutableMap.of("FEE", "42"));
|
||||
thrown.expect(TestExtraLogicManagerSuccessException.class, "flag1,flag2");
|
||||
runFlow();
|
||||
EppOutput eppOutput = runFlow();
|
||||
String domainNameWithFlagsPrefix =
|
||||
((DomainCreateData) eppOutput.getResponse().getResponseData().get(0)).name();
|
||||
assertThat(domainNameWithFlagsPrefix).isEqualTo("flag1-flag2-create-42.flags");
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue