mirror of
https://github.com/google/nomulus.git
synced 2025-05-15 00:47:11 +02:00
Support version 0.12 of the EPP Fee Extension
The corresponding version of the specification is 8. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=127968603
This commit is contained in:
parent
38e7b07c93
commit
b83b3b313f
56 changed files with 2505 additions and 13 deletions
|
@ -479,6 +479,15 @@ public class DomainApplicationCreateFlowTest
|
|||
doSuccessfulTest("domain_create_landrush_fee_response.xml", false, "0.11", "fee11");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testSuccess_landrushApplicationWithFee_v12() throws Exception {
|
||||
createTld("tld", TldState.LANDRUSH);
|
||||
setEppInput("domain_create_landrush_fee.xml", ImmutableMap.of("FEE_VERSION", "0.12"));
|
||||
persistContactsAndHosts();
|
||||
clock.advanceOneMilli();
|
||||
doSuccessfulTest("domain_create_landrush_fee_response.xml", false, "0.12", "fee12");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testSuccess_landrushApplicationWithFee_withDefaultAttributes_v06() throws Exception {
|
||||
createTld("tld", TldState.LANDRUSH);
|
||||
|
@ -497,6 +506,15 @@ public class DomainApplicationCreateFlowTest
|
|||
doSuccessfulTest("domain_create_landrush_fee_response.xml", false, "0.11", "fee11");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testSuccess_landrushApplicationWithFee_withDefaultAttributes_v12() throws Exception {
|
||||
createTld("tld", TldState.LANDRUSH);
|
||||
setEppInput("domain_create_landrush_fee_defaults.xml", ImmutableMap.of("FEE_VERSION", "0.12"));
|
||||
persistContactsAndHosts();
|
||||
clock.advanceOneMilli();
|
||||
doSuccessfulTest("domain_create_landrush_fee_response.xml", false, "0.12", "fee12");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testFailure_landrushApplicationWithRefundableFee_v06() throws Exception {
|
||||
thrown.expect(UnsupportedFeeAttributeException.class);
|
||||
|
@ -518,6 +536,17 @@ public class DomainApplicationCreateFlowTest
|
|||
runFlow();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testFailure_landrushApplicationWithRefundableFee_v12() throws Exception {
|
||||
thrown.expect(UnsupportedFeeAttributeException.class);
|
||||
createTld("tld", TldState.LANDRUSH);
|
||||
persistContactsAndHosts();
|
||||
clock.advanceOneMilli();
|
||||
setEppInput(
|
||||
"domain_create_landrush_fee_refundable.xml", ImmutableMap.of("FEE_VERSION", "0.12"));
|
||||
runFlow();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testFailure_landrushApplicationWithGracePeriodFee_v06() throws Exception {
|
||||
thrown.expect(UnsupportedFeeAttributeException.class);
|
||||
|
@ -540,6 +569,17 @@ public class DomainApplicationCreateFlowTest
|
|||
runFlow();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testFailure_landrushApplicationWithGracePeriodFee_v12() throws Exception {
|
||||
thrown.expect(UnsupportedFeeAttributeException.class);
|
||||
createTld("tld", TldState.LANDRUSH);
|
||||
persistContactsAndHosts();
|
||||
clock.advanceOneMilli();
|
||||
setEppInput(
|
||||
"domain_create_landrush_fee_grace_period.xml", ImmutableMap.of("FEE_VERSION", "0.12"));
|
||||
runFlow();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testFailure_landrushApplicationWithAppliedFee_v06() throws Exception {
|
||||
thrown.expect(UnsupportedFeeAttributeException.class);
|
||||
|
@ -560,6 +600,16 @@ public class DomainApplicationCreateFlowTest
|
|||
runFlow();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testFailure_landrushApplicationWithAppliedFee_v12() throws Exception {
|
||||
thrown.expect(UnsupportedFeeAttributeException.class);
|
||||
createTld("tld", TldState.LANDRUSH);
|
||||
persistContactsAndHosts();
|
||||
clock.advanceOneMilli();
|
||||
setEppInput("domain_create_landrush_fee_applied.xml", ImmutableMap.of("FEE_VERSION", "0.12"));
|
||||
runFlow();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testSuccess_landrushWithClaims() throws Exception {
|
||||
createTld("tld", TldState.LANDRUSH);
|
||||
|
@ -1211,6 +1261,18 @@ public class DomainApplicationCreateFlowTest
|
|||
runFlow();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testFailure_wrongFeeLandrushApplication_v12() throws Exception {
|
||||
thrown.expect(FeesMismatchException.class);
|
||||
createTld("tld", TldState.LANDRUSH);
|
||||
setEppInput("domain_create_landrush_fee.xml", ImmutableMap.of("FEE_VERSION", "0.12"));
|
||||
persistResource(
|
||||
Registry.get("tld").asBuilder().setCreateBillingCost(Money.of(USD, 20)).build());
|
||||
persistContactsAndHosts();
|
||||
clock.advanceOneMilli();
|
||||
runFlow();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testFailure_wrongCurrency_v06() throws Exception {
|
||||
thrown.expect(CurrencyUnitMismatchException.class);
|
||||
|
@ -1247,6 +1309,24 @@ public class DomainApplicationCreateFlowTest
|
|||
runFlow();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testFailure_wrongCurrency_v12() throws Exception {
|
||||
thrown.expect(CurrencyUnitMismatchException.class);
|
||||
createTld("tld", TldState.LANDRUSH);
|
||||
setEppInput("domain_create_landrush_fee.xml", ImmutableMap.of("FEE_VERSION", "0.12"));
|
||||
persistResource(Registry.get("tld").asBuilder()
|
||||
.setCurrency(CurrencyUnit.EUR)
|
||||
.setCreateBillingCost(Money.of(EUR, 13))
|
||||
.setRestoreBillingCost(Money.of(EUR, 11))
|
||||
.setRenewBillingCostTransitions(ImmutableSortedMap.of(START_OF_TIME, Money.of(EUR, 7)))
|
||||
.setEapFeeSchedule(ImmutableSortedMap.of(START_OF_TIME, Money.zero(EUR)))
|
||||
.setServerStatusChangeBillingCost(Money.of(EUR, 19))
|
||||
.build());
|
||||
persistContactsAndHosts();
|
||||
clock.advanceOneMilli();
|
||||
runFlow();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testFailure_feeGivenInWrongScale_v06() throws Exception {
|
||||
thrown.expect(CurrencyValueScaleException.class);
|
||||
|
@ -1267,6 +1347,16 @@ public class DomainApplicationCreateFlowTest
|
|||
runFlow();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testFailure_feeGivenInWrongScale_v12() throws Exception {
|
||||
thrown.expect(CurrencyValueScaleException.class);
|
||||
createTld("tld", TldState.LANDRUSH);
|
||||
setEppInput("domain_create_landrush_fee_bad_scale.xml", ImmutableMap.of("FEE_VERSION", "0.12"));
|
||||
persistContactsAndHosts();
|
||||
clock.advanceOneMilli();
|
||||
runFlow();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testFailure_alreadyExists() throws Exception {
|
||||
// This fails fast and throws DomainAlreadyExistsException from init() as a special case.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue