mirror of
https://github.com/google/nomulus.git
synced 2025-05-15 08:57:12 +02:00
Improve ListDomainsCommand to list domains on multiple TLDs
------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=140053423
This commit is contained in:
parent
35d88a9f8c
commit
5eb9702f05
11 changed files with 120 additions and 88 deletions
|
@ -14,7 +14,11 @@
|
|||
|
||||
package google.registry.tools;
|
||||
|
||||
import com.google.common.base.Strings;
|
||||
import com.google.common.collect.ImmutableList;
|
||||
import google.registry.tools.server.ListDomainsAction;
|
||||
import java.util.List;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.mockito.runners.MockitoJUnitRunner;
|
||||
|
||||
|
@ -32,7 +36,15 @@ public class ListDomainsCommandTest extends ListObjectsCommandTestCase<ListDomai
|
|||
}
|
||||
|
||||
@Override
|
||||
final String getTld() {
|
||||
return "foo";
|
||||
protected List<String> getTlds() {
|
||||
return ImmutableList.of("foo");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void test_tldsParamTooLong() throws Exception {
|
||||
String tldsParam = "--tld=foo,bar" + Strings.repeat(",baz", 300);
|
||||
thrown.expect(
|
||||
IllegalArgumentException.class, "Total length of TLDs is too long for URL parameter");
|
||||
runCommand(tldsParam);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue