mirror of
https://github.com/google/nomulus.git
synced 2025-05-14 00:17:20 +02:00
Add EAP fee to domain check flow
(Original from mmuller@: [] ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=126911443
This commit is contained in:
parent
5ebfb87651
commit
262aab22b9
4 changed files with 77 additions and 15 deletions
|
@ -22,10 +22,13 @@ import static google.registry.testing.DatastoreHelper.persistDeletedDomain;
|
|||
import static google.registry.testing.DatastoreHelper.persistPremiumList;
|
||||
import static google.registry.testing.DatastoreHelper.persistReservedList;
|
||||
import static google.registry.testing.DatastoreHelper.persistResource;
|
||||
import static google.registry.util.DateTimeUtils.START_OF_TIME;
|
||||
import static org.joda.money.CurrencyUnit.USD;
|
||||
|
||||
import com.google.common.base.Strings;
|
||||
import com.google.common.collect.ImmutableMap;
|
||||
import com.google.common.collect.ImmutableSet;
|
||||
import com.google.common.collect.ImmutableSortedMap;
|
||||
|
||||
import google.registry.flows.ResourceCheckFlow.TooManyResourceChecksException;
|
||||
import google.registry.flows.ResourceCheckFlowTestCase;
|
||||
|
@ -57,6 +60,7 @@ import google.registry.testing.DatastoreHelper;
|
|||
|
||||
import org.joda.money.CurrencyUnit;
|
||||
import org.joda.money.Money;
|
||||
import org.joda.time.DateTime;
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
|
||||
|
@ -502,4 +506,18 @@ public class DomainCheckFlowTest
|
|||
create(true, "example2.tld", null),
|
||||
create(true, "example3.tld", null));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testSuccess_eapFeeCheck() throws Exception {
|
||||
clock.setTo(DateTime.parse("2010-01-01T10:00:00Z"));
|
||||
persistActiveDomain("example1.tld");
|
||||
persistResource(Registry.get("tld").asBuilder()
|
||||
.setEapFeeSchedule(ImmutableSortedMap.of(
|
||||
START_OF_TIME, Money.of(USD, 0),
|
||||
clock.nowUtc().minusDays(1), Money.of(USD, 100),
|
||||
clock.nowUtc().plusDays(1), Money.of(USD, 0)))
|
||||
.build());
|
||||
setEppInput("domain_check_fee.xml");
|
||||
runFlowAssertResponse(readFile("domain_check_eap_fee_response.xml"));
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue