mirror of
https://github.com/google/nomulus.git
synced 2025-07-24 03:30:46 +02:00
Statically import commonly used TldState enum values
Takes advantage of the fact that the default state of a TLD created in tests is GENERAL_AVAILABILITY. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=228916164
This commit is contained in:
parent
eeb65b4610
commit
170980db2f
14 changed files with 62 additions and 63 deletions
|
@ -28,6 +28,7 @@ import static google.registry.model.EppResourceUtils.createDomainRepoId;
|
|||
import static google.registry.model.EppResourceUtils.createRepoId;
|
||||
import static google.registry.model.ResourceTransferUtils.createTransferResponse;
|
||||
import static google.registry.model.ofy.ObjectifyService.ofy;
|
||||
import static google.registry.model.registry.Registry.TldState.GENERAL_AVAILABILITY;
|
||||
import static google.registry.model.registry.label.PremiumListUtils.parentPremiumListEntriesOnRevision;
|
||||
import static google.registry.pricing.PricingEngineProxy.getDomainRenewCost;
|
||||
import static google.registry.util.CollectionUtils.difference;
|
||||
|
@ -179,8 +180,7 @@ public class DatastoreHelper {
|
|||
}
|
||||
|
||||
public static Registry newRegistry(String tld, String roidSuffix) {
|
||||
return newRegistry(
|
||||
tld, roidSuffix, ImmutableSortedMap.of(START_OF_TIME, TldState.GENERAL_AVAILABILITY));
|
||||
return newRegistry(tld, roidSuffix, ImmutableSortedMap.of(START_OF_TIME, GENERAL_AVAILABILITY));
|
||||
}
|
||||
|
||||
public static Registry newRegistry(
|
||||
|
@ -332,17 +332,17 @@ public class DatastoreHelper {
|
|||
|
||||
/** Creates and persists a tld. */
|
||||
public static void createTld(String tld) {
|
||||
createTld(tld, TldState.GENERAL_AVAILABILITY);
|
||||
createTld(tld, GENERAL_AVAILABILITY);
|
||||
}
|
||||
|
||||
public static void createTld(String tld, String roidSuffix) {
|
||||
createTld(tld, roidSuffix, ImmutableSortedMap.of(START_OF_TIME, TldState.GENERAL_AVAILABILITY));
|
||||
createTld(tld, roidSuffix, ImmutableSortedMap.of(START_OF_TIME, GENERAL_AVAILABILITY));
|
||||
}
|
||||
|
||||
/** Creates and persists the given TLDs. */
|
||||
public static void createTlds(String... tlds) {
|
||||
for (String tld : tlds) {
|
||||
createTld(tld, TldState.GENERAL_AVAILABILITY);
|
||||
createTld(tld, GENERAL_AVAILABILITY);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue