Change lrpTldStates to Interval

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=135957698
This commit is contained in:
ctingue 2016-10-12 13:51:28 -07:00 committed by Ben McIlwain
parent edbb8985e6
commit 4e0b6d36c4
13 changed files with 232 additions and 131 deletions

View file

@ -445,21 +445,4 @@ public class RegistryTest extends EntityTestCase {
.setEapFeeSchedule(ImmutableSortedMap.of(START_OF_TIME, Money.zero(EUR)))
.build();
}
@Test
public void testFailure_lrpTldState_notInTransitions() {
Registry registry = Registry.get("tld").asBuilder()
.setTldStateTransitions(ImmutableSortedMap.<DateTime, TldState>naturalOrder()
.put(START_OF_TIME, TldState.PREDELEGATION)
.put(clock.nowUtc().plusMonths(1), TldState.SUNRISE)
.put(clock.nowUtc().plusMonths(3), TldState.LANDRUSH)
.put(clock.nowUtc().plusMonths(4), TldState.QUIET_PERIOD)
.put(clock.nowUtc().plusMonths(5), TldState.GENERAL_AVAILABILITY)
.build())
.build();
thrown.expect(
IllegalArgumentException.class,
"Cannot specify an LRP TLD state that is not part of the TLD state transitions.");
registry.asBuilder().setLrpTldStates(ImmutableSet.of(TldState.SUNRUSH)).build();
}
}

View file

@ -693,7 +693,6 @@ class google.registry.model.registry.Registry {
java.lang.String tldStr;
java.lang.String tldUnicode;
java.util.Set<com.googlecode.objectify.Key<google.registry.model.registry.label.ReservedList>> reservedLists;
java.util.Set<google.registry.model.registry.Registry$TldState> lrpTldStates;
java.util.Set<java.lang.String> allowedFullyQualifiedHostNames;
java.util.Set<java.lang.String> allowedRegistrantContactIds;
org.joda.money.CurrencyUnit currency;
@ -701,6 +700,8 @@ class google.registry.model.registry.Registry {
org.joda.money.Money restoreBillingCost;
org.joda.money.Money serverStatusChangeBillingCost;
org.joda.time.DateTime claimsPeriodEnd;
org.joda.time.DateTime lrpPeriodEnd;
org.joda.time.DateTime lrpPeriodStart;
org.joda.time.Duration addGracePeriodLength;
org.joda.time.Duration anchorTenantAddGracePeriodLength;
org.joda.time.Duration autoRenewGracePeriodLength;