Refactor Fee class to support EAP fee

Currently EapFee is a separate class that has no inheritance from either
BaseFee and Fee. With this CL its functionality is merged into the Fee class
and the type of the fee can be identified by the FeeType enum in the Fee class.
Future custom fees can follow the same pattern.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=133627570
This commit is contained in:
jianglai 2016-09-19 13:53:38 -07:00 committed by Ben McIlwain
parent 0518f63aad
commit 77571e2063
9 changed files with 121 additions and 131 deletions

View file

@ -171,7 +171,8 @@ public class DomainCreateFlowTest extends ResourceFlowTestCase<DomainCreateFlow,
Money cost = getPricesForDomainName(getUniqueIdFromCommand(), clock.nowUtc()).isPremium()
? Money.of(USD, 200)
: Money.of(USD, 26);
Money eapFee = Registry.get(domainTld).getEapFeeFor(clock.nowUtc()).getCost();
Money eapFee = Money.of(Registry.get(domainTld).getCurrency(),
Registry.get(domainTld).getEapFeeFor(clock.nowUtc()).getCost());
DateTime billingTime = isAnchorTenant
? clock.nowUtc().plus(Registry.get(domainTld).getAnchorTenantAddGracePeriodLength())