mirror of
https://github.com/google/nomulus.git
synced 2025-05-15 08:57:12 +02:00
Add gTech commands for dealing with DotAppRegistrarInfo
------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=123529640
This commit is contained in:
parent
4876d09d6c
commit
ca585dd0b5
2 changed files with 9 additions and 5 deletions
|
@ -10,7 +10,9 @@ load("//java/com/google/testing/builddefs:GenTestRules.bzl", "GenTestRules")
|
|||
|
||||
java_library(
|
||||
name = "tools",
|
||||
srcs = glob(["*.java"]),
|
||||
srcs = glob([
|
||||
"*.java",
|
||||
]),
|
||||
resources = glob(["testdata/*.*"]),
|
||||
deps = [
|
||||
"//java/com/google/common/annotations",
|
||||
|
|
|
@ -93,12 +93,12 @@ public abstract class CommandTestCase<C extends Command> {
|
|||
}
|
||||
}
|
||||
|
||||
void runCommand(String... args) throws Exception {
|
||||
protected void runCommand(String... args) throws Exception {
|
||||
runCommandInEnvironment(RegistryToolEnvironment.UNITTEST, args);
|
||||
}
|
||||
|
||||
/** Adds "--force" as the first parameter, then runs the command. */
|
||||
void runCommandForced(String... args) throws Exception {
|
||||
protected void runCommandForced(String... args) throws Exception {
|
||||
runCommand(ObjectArrays.concat("--force", args));
|
||||
}
|
||||
|
||||
|
@ -149,8 +149,10 @@ public abstract class CommandTestCase<C extends Command> {
|
|||
return ofy().load().type(PollMessage.class).count();
|
||||
}
|
||||
|
||||
void assertInStdout(String expected) throws Exception {
|
||||
assertThat(stdout.toString(UTF_8.toString())).contains(expected);
|
||||
protected void assertInStdout(String... expected) throws Exception {
|
||||
for (String line : expected) {
|
||||
assertThat(stdout.toString(UTF_8.toString())).contains(line);
|
||||
}
|
||||
}
|
||||
|
||||
void assertNotInStdout(String expected) throws Exception {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue