This improves the tests by:
1) Adding tests for alphabetical ordering of the command maps, to keep them
organized, and fixing existing mis-orderings. Note that this is a no-op
test for RegistryTool since it uses ImmutableSortedMap (to resort the
commands after inserting GtechTool.COMMAND_MAP), but it'll be relevant
in the upcoming CL when they get merged. I changed GtechTool.COMMAND_MAP
to use regular ImmutableMap.
2) Checking that RegistryTool.COMMAND_MAP (the full map, after the existing
GtechTool.COMMAND_MAP has been merged in) contains the exact same set of
commands as all the concrete classes implementing Command that we can find.
This is a stronger test than what we had before, which just checked that
every Command class appeared in RegistryTool (i.e. that RegistryTool's
commands are a superset of all Commands found). You'd think that it'd be
impossible for RegistryTool to contain commands that aren't in the set of
Commands we found, but it is if we're not searching for commands properly,
which we weren't (we were only checking within the .tools package and not
within any subpackages (e.g. tools.javascrap). This has now been fixed.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=134451859
This removes exception rules that aren't used and switches over
existing uses of ExceptedException to ExceptionRule when possible.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=129013329
The dark lord Gosling designed the Java package naming system so that
ownership flows from the DNS system. Since we own the domain name
registry.google, it seems only appropriate that we should use
google.registry as our package name.
This change renames directories in preparation for the great package
rename. The repository is now in a broken state because the code
itself hasn't been updated. However this should ensure that git
correctly preserves history for each file.
2016-05-13 18:55:08 -04:00
Renamed from javatests/com/google/domain/registry/tools/RegistryToolTest.java (Browse further)