Use TldSpecificLogicProxy to fetch renew price in DomainRenewFlow

The renew flow was still using PricingEngineProxy directly, meaning that it did not pick up on any TLD-specific pricing logic. Fixed this, and added tests to make sure.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=136757922
This commit is contained in:
mountford 2016-10-20 14:10:43 -07:00 committed by Ben McIlwain
parent ae7933da57
commit fd1c68ffb9
4 changed files with 34 additions and 8 deletions

View file

@ -613,11 +613,20 @@ public class DomainRenewFlowTest extends ResourceFlowTestCase<DomainRenewFlow, D
runFlow();
}
@Test
public void testFailure_flags_feeMismatch() throws Exception {
setEppInput("domain_renew_flags.xml", ImmutableMap.of("FEE", "11"));
persistDomain();
thrown.expect(FeesMismatchException.class);
runFlow();
}
@Test
public void testSuccess_flags() throws Exception {
setEppInput("domain_renew_flags.xml");
setEppInput("domain_renew_flags.xml", ImmutableMap.of("FEE", "42"));
persistDomain();
thrown.expect(TestExtraLogicManagerSuccessException.class, "renewed");
runFlow();
}
}