google-nomulus/javatests/com/google/domain/registry
nickfelt 5174c1c63f Improve RegistryToolEnvironment setup behavior
Here's an alternate approach that I think simplifies the existing
code quite a bit.  Now instead of doing:

  RegistryToolEnvironment.loadFromArgs(args);
  RegistryToolEnvironment.get().setup();

You just do one chained call:

  RegistryToolEnvironment.parseFromArgs(args).setup();

or call setup() on a known environment constant:

  RegistryToolEnvironment.ALPHA.setup();

This avoids having loadFromArgs() implicitly set the active env
(but *not* do setup) and then having setup() *not* set the active
env, both of which were confusing.  Now parseFromArgs() is only
responsible for parsing from args, and setup() both sets the env
as the active one and does the environment variable setup (which
also ensures that the RegistryToolEnvironment.instance field
doesn't get out of sync with the RegistryEnvironment value).

In addition, this CL adds a runCommandInEnvironment() method to
CommandTestCase and ensures that the UNITTEST environment is always
set before constructing the default command instance.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=117492978
2016-03-23 22:38:08 -04:00
..
backup Import code from internal repository to git 2016-03-01 17:59:16 -05:00
bigquery Import code from internal repository to git 2016-03-01 17:59:16 -05:00
config Import code from internal repository to git 2016-03-01 17:59:16 -05:00
cron Import code from internal repository to git 2016-03-01 17:59:16 -05:00
dns Rename Runnable classes from Tasks to Actions 2016-03-16 21:20:25 -04:00
export Rename Runnable classes from Tasks to Actions 2016-03-16 21:20:25 -04:00
flows Make Cancellation OneTime vs Recurring logic explicit 2016-03-16 21:20:25 -04:00
groups Import code from internal repository to git 2016-03-01 17:59:16 -05:00
mapreduce/inputs Break out EppResourceInput subclasses 2016-03-16 21:20:25 -04:00
model Remove EppResource.SharedFields following successful data migration 2016-03-23 22:38:08 -04:00
module Import code from internal repository to git 2016-03-01 17:59:16 -05:00
monitoring/whitebox Import code from internal repository to git 2016-03-01 17:59:16 -05:00
rdap RDAP: Add boilerplate entries required by ICANN RDAP Profile 2016-03-04 16:25:25 -05:00
rde Rename Runnable classes from Tasks to Actions 2016-03-16 21:20:25 -04:00
request Import code from internal repository to git 2016-03-01 17:59:16 -05:00
security Import code from internal repository to git 2016-03-01 17:59:16 -05:00
server Delete admin console 2016-03-10 16:48:39 -05:00
storage/drive Import code from internal repository to git 2016-03-01 17:59:16 -05:00
testing Add [] to export domain lists to GCS 2016-03-10 16:48:39 -05:00
tldconfig/idn Import code from internal repository to git 2016-03-01 17:59:16 -05:00
tmch Rename Runnable classes from Tasks to Actions 2016-03-16 21:20:25 -04:00
tools Improve RegistryToolEnvironment setup behavior 2016-03-23 22:38:08 -04:00
ui Rename Runnable classes from Tasks to Actions 2016-03-16 21:20:25 -04:00
util Import code from internal repository to git 2016-03-01 17:59:16 -05:00
whois Import code from internal repository to git 2016-03-01 17:59:16 -05:00
xjc Import code from internal repository to git 2016-03-01 17:59:16 -05:00
xml Import code from internal repository to git 2016-03-01 17:59:16 -05:00