Add gTech commands for dealing with DotAppRegistrarInfo

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=123529640
This commit is contained in:
mcilwain 2016-05-29 07:06:56 -07:00 committed by Ben McIlwain
parent 4876d09d6c
commit ca585dd0b5
2 changed files with 9 additions and 5 deletions

View file

@ -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 {