mirror of
https://github.com/google/nomulus
synced 2026-01-08 15:21:46 +00:00
Add an EPP lifecycle test verifying that EAP fees are not refunded
This also incorporates general improvements and additions to the existing EPP lifecycle tests around domain deletion. As a refresher: There is a 5 day add grace period (AGP) following domain creation. Domains that are deleted during that period have their create costs (but not EAP costs) refunded. This deletion takes place immediately. Refunds are implemented by issuing a Cancellation for the associated OneTime billing event. Domains that are deleted after AGP ends first go through a 30 day redemption grace period followed by a 5 day pending deletion period. No create fees are refunded in this case. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=179597874
This commit is contained in:
@@ -189,11 +189,11 @@ public abstract class BillingEvent extends ImmutableObject
|
||||
@Override
|
||||
public T build() {
|
||||
T instance = getInstance();
|
||||
checkNotNull(instance.reason);
|
||||
checkNotNull(instance.clientId);
|
||||
checkNotNull(instance.eventTime);
|
||||
checkNotNull(instance.targetId);
|
||||
checkNotNull(instance.parent);
|
||||
checkNotNull(instance.reason, "Reason must be set");
|
||||
checkNotNull(instance.clientId, "Client ID must be set");
|
||||
checkNotNull(instance.eventTime, "Event time must be set");
|
||||
checkNotNull(instance.targetId, "Target ID must be set");
|
||||
checkNotNull(instance.parent, "Parent must be set");
|
||||
return super.build();
|
||||
}
|
||||
}
|
||||
@@ -502,8 +502,8 @@ public abstract class BillingEvent extends ImmutableObject
|
||||
@Override
|
||||
public Cancellation build() {
|
||||
Cancellation instance = getInstance();
|
||||
checkNotNull(instance.billingTime);
|
||||
checkNotNull(instance.reason);
|
||||
checkNotNull(instance.billingTime, "Must set billing time");
|
||||
checkNotNull(instance.reason, "Must set reason");
|
||||
checkState((instance.refOneTime == null) != (instance.refRecurring == null),
|
||||
"Cancellations must have exactly one billing event key set");
|
||||
return super.build();
|
||||
|
||||
Reference in New Issue
Block a user