From 273fc0014d58aed4a23bca4760c0147ed5ab7673 Mon Sep 17 00:00:00 2001 From: ctingue Date: Fri, 1 Jul 2016 08:16:31 -0700 Subject: [PATCH] Add EAP fees to domain create flow ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=126411200 --- .../flows/domain/BaseDomainCreateFlow.java | 10 ++-- .../domain/DomainApplicationCreateFlow.java | 8 +-- .../flows/domain/DomainCreateFlow.java | 7 +-- .../domain/DomainCreateOrAllocateFlow.java | 5 +- .../flows/domain/DomainCreateFlowTest.java | 51 +++++++++++++++++-- .../domain/testdata/domain_create_eap_fee.xml | 29 +++++++++++ .../domain_create_response_eap_fee.xml | 26 ++++++++++ 7 files changed, 118 insertions(+), 18 deletions(-) create mode 100644 javatests/google/registry/flows/domain/testdata/domain_create_eap_fee.xml create mode 100644 javatests/google/registry/flows/domain/testdata/domain_create_response_eap_fee.xml diff --git a/java/google/registry/flows/domain/BaseDomainCreateFlow.java b/java/google/registry/flows/domain/BaseDomainCreateFlow.java index 343839f38..b46b9323c 100644 --- a/java/google/registry/flows/domain/BaseDomainCreateFlow.java +++ b/java/google/registry/flows/domain/BaseDomainCreateFlow.java @@ -36,7 +36,6 @@ import static google.registry.model.EppResourceUtils.loadByUniqueId; import static google.registry.model.ofy.ObjectifyService.ofy; import static google.registry.model.registry.Registries.findTldForName; import static google.registry.model.registry.label.ReservedList.matchesAnchorTenantReservation; -import static google.registry.pricing.PricingEngineProxy.getDomainCreateCost; import static google.registry.util.CollectionUtils.nullToEmpty; import com.google.common.base.Optional; @@ -66,8 +65,8 @@ import google.registry.model.registry.Registry; import google.registry.model.registry.Registry.TldState; import google.registry.model.smd.SignedMark; import google.registry.model.tmch.ClaimsListShard; - -import org.joda.money.Money; +import google.registry.pricing.TldSpecificLogicEngine; +import google.registry.pricing.TldSpecificLogicEngine.EppCommandOperations; import java.util.Set; @@ -89,7 +88,7 @@ public abstract class BaseDomainCreateFlow + + + + example.tld + 2 + + ns1.example.net + ns2.example.net + + jd1234 + sh8013 + sh8013 + + 2fooBAR + + + + + + USD + 26.00 + 100.00 + + + ABC-12345 + + diff --git a/javatests/google/registry/flows/domain/testdata/domain_create_response_eap_fee.xml b/javatests/google/registry/flows/domain/testdata/domain_create_response_eap_fee.xml new file mode 100644 index 000000000..7b5bbeb5b --- /dev/null +++ b/javatests/google/registry/flows/domain/testdata/domain_create_response_eap_fee.xml @@ -0,0 +1,26 @@ + + + + Command completed successfully + + + + example.tld + 1999-04-03T22:00:00.0Z + 2001-04-03T22:00:00.0Z + + + + + USD + 26.00 + 100.00 + + + + ABC-12345 + server-trid + + +