Delete remnants of registrar-level credits

We never fully used this stuff but definitely no longer use it following our
recent billing refactor. It's confusing to retain all of these entities and
commands given that none of them are actually used by anything.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=201978094
This commit is contained in:
mcilwain 2018-06-25 10:39:45 -07:00 committed by Ben McIlwain
parent 4cddbdacff
commit 6706b99828
24 changed files with 1 additions and 2545 deletions

View file

@ -28,14 +28,12 @@ import com.beust.jcommander.ParameterException;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableMap;
import com.google.common.collect.ImmutableSet;
import google.registry.model.billing.RegistrarBillingEntry;
import google.registry.model.registrar.Registrar;
import google.registry.model.registrar.Registrar.BillingMethod;
import google.registry.model.registrar.Registrar.State;
import google.registry.model.registrar.Registrar.Type;
import google.registry.util.CidrAddressBlock;
import org.joda.money.CurrencyUnit;
import org.joda.money.Money;
import org.joda.time.DateTime;
import org.junit.Test;
@ -269,30 +267,6 @@ public class UpdateRegistrarCommandTest extends CommandTestCase<UpdateRegistrarC
.isEqualTo(BillingMethod.BRAINTREE);
}
@Test
public void testFailure_changeBillingMethodWhenBalanceIsNonZero() {
createTlds("xn--q9jyb4c");
Registrar registrar = loadRegistrar("NewRegistrar");
persistResource(
new RegistrarBillingEntry.Builder()
.setPrevious(null)
.setParent(registrar)
.setCreated(DateTime.parse("1984-12-18TZ"))
.setDescription("USD Invoice for December")
.setAmount(Money.parse("USD 10.00"))
.build());
assertThat(registrar.getBillingMethod()).isEqualTo(BillingMethod.EXTERNAL);
IllegalStateException thrown =
assertThrows(
IllegalStateException.class,
() -> runCommand("--billing_method=braintree", "--force", "NewRegistrar"));
assertThat(thrown)
.hasMessageThat()
.isEqualTo(
"Refusing to change billing method on Registrar 'NewRegistrar' from EXTERNAL to "
+ "BRAINTREE because current balance is non-zero: {USD=USD 10.00}");
}
@Test
public void testSuccess_streetAddress() throws Exception {
runCommand("--street=\"1234 Main St\"", "--street \"4th Floor\"", "--street \"Suite 1\"",