google-nomulus/javatests/com/google/domain/registry/model
nickfelt 9786e6732f Make GracePeriod OneTime vs Recurring logic explicit
This CL cleans up some old crufy logic in GracePeriod that overloaded
methods to accept either OneTime or Recurring billing events refs,
despite storing them in separate fields in the entity (since
BillingEvent is not a polymorphic superclass, just a Java-only one,
you can't store them as refs to BillingEvent).

That overloading was ultimately only there as a convenience/hack from
when we added Recurring events and didn't want to go back and change
everything.  It obfuscates what's really going on, requires extra
casting/loss of type-safety, and relies on indirect signals (e.g. the
grace period type being AUTO_RENEW) to guess what the right billing
event type is.  That latter aspect will likely no longer work in a
monthly billing world, and was brittle in any case.

A coming CL will rip the same logic out of Cancellation.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=117164286
2016-03-16 21:20:25 -04:00
..
billing Import code from internal repository to git 2016-03-01 17:59:16 -05:00
common Import code from internal repository to git 2016-03-01 17:59:16 -05:00
contact Import code from internal repository to git 2016-03-01 17:59:16 -05:00
domain Make GracePeriod OneTime vs Recurring logic explicit 2016-03-16 21:20:25 -04:00
eppoutput Import code from internal repository to git 2016-03-01 17:59:16 -05:00
export Import code from internal repository to git 2016-03-01 17:59:16 -05:00
host Import code from internal repository to git 2016-03-01 17:59:16 -05:00
index Import code from internal repository to git 2016-03-01 17:59:16 -05:00
mark Import code from internal repository to git 2016-03-01 17:59:16 -05:00
ofy Import code from internal repository to git 2016-03-01 17:59:16 -05:00
poll Import code from internal repository to git 2016-03-01 17:59:16 -05:00
rde Import code from internal repository to git 2016-03-01 17:59:16 -05:00
registrar Import code from internal repository to git 2016-03-01 17:59:16 -05:00
registry Import code from internal repository to git 2016-03-01 17:59:16 -05:00
reporting Import code from internal repository to git 2016-03-01 17:59:16 -05:00
server Import code from internal repository to git 2016-03-01 17:59:16 -05:00
smd Import code from internal repository to git 2016-03-01 17:59:16 -05:00
testdata Import code from internal repository to git 2016-03-01 17:59:16 -05:00
tmch Import code from internal repository to git 2016-03-01 17:59:16 -05:00
transfer Import code from internal repository to git 2016-03-01 17:59:16 -05:00
translators Import code from internal repository to git 2016-03-01 17:59:16 -05:00
BUILD Import code from internal repository to git 2016-03-01 17:59:16 -05:00
CreateAutoTimestampTest.java Import code from internal repository to git 2016-03-01 17:59:16 -05:00
EntityClassesTest.java Import code from internal repository to git 2016-03-01 17:59:16 -05:00
EntityTestCase.java Import code from internal repository to git 2016-03-01 17:59:16 -05:00
EppResourceUtilsTest.java Import code from internal repository to git 2016-03-01 17:59:16 -05:00
ImmutableObjectTest.java Import code from internal repository to git 2016-03-01 17:59:16 -05:00
ModelUtilsTest.java Import code from internal repository to git 2016-03-01 17:59:16 -05:00
ResourceCommandTestCase.java Import code from internal repository to git 2016-03-01 17:59:16 -05:00
RoidSuffixesTest.java Import code from internal repository to git 2016-03-01 17:59:16 -05:00
schema.txt Import code from internal repository to git 2016-03-01 17:59:16 -05:00
SchemaVersionTest.java Import code from internal repository to git 2016-03-01 17:59:16 -05:00
UpdateAutoTimestampTest.java Import code from internal repository to git 2016-03-01 17:59:16 -05:00