-
Notifications
You must be signed in to change notification settings - Fork 49
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add validation to Registrar. Add RegistrarTest to exercise it. #361
Merged
Merged
Changes from 2 commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
4b3824a
Add dryrun option -n
johnrandolph e0c6de0
Oops, shift by the option
johnrandolph a6b72b2
Remove dbg
johnrandolph bf78213
Merge remote-tracking branch 'faucet/master'
johnrandolph 5e9de32
Merge remote-tracking branch 'faucet/master'
johnrandolph 00ac587
Merge remote-tracking branch 'faucet/master'
johnrandolph b60ecdb
First pass at RegistrarTest and slight changes to Registrar.
johnrandolph 2ad6e87
Add validation tests
johnrandolph d159768
Test work
johnrandolph 6793eff
Test improvements
johnrandolph 0f662bb
Merge branch 'master' into master
johnrandolph 167e8de
Merge
johnrandolph eeb32b4
Fixes from first review
johnrandolph cc2f8b6
Move execute to method, keep argv parsing in class
johnrandolph 7afa5b0
Import
johnrandolph bac9875
Merge remote-tracking branch 'faucet/master'
johnrandolph fdfda2e
Lint fixes
johnrandolph 45ea044
Up the warnings
johnrandolph File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Still not sure why this is static? The general adage with static methods for Java is to avoid them unless they need to be static for some reason. I think this comes down to the issue that you can't mock/override a static method, so it makes future testing/extension a problem sometimes. Not likely in this case, but just on general practice. E.g., I would expect this to be just a regular method on the Registrar class (no need to pass in the explicit parameter). Anyway, that's mainly the Java-style that I've always used, but it's been so long that I'm not 100% sure where it came from. I checked the Java style guide and it doesn't say anything about it. Doesn't really matter -- I also optimize for "least number of words" and if you made it a class method, all references to "registrar." go away reducing the overall footprint of the class -- and there's no world in which you would call this method without a registrar class!