Commit graph

5 commits

Author SHA1 Message Date
mcilwain
9157930983 Automatically refactor more exception testing to use new JUnit rules
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=179072309
2017-12-27 10:50:20 -05:00
mcilwain
b825a2b5a8 Get rid of custom ExceptionRule methods
The only remaining methods on ExceptionRule after this are methods that
also exist on ExpectedException, which will allow us to, in the next CL,
swap out the one for the other and then run the automated refactoring to
turn it all into assertThrows/expectThrows.

Note that there were some assertions about root causes that couldn't
easily be turned into ExpectedException invocations, so I simply
converted them directly to usages of assertThrows/expectThrows.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=178623431
2017-12-13 12:43:45 -05:00
guyben
68768a561f Refactor EppToolVerifier to accept chaining verify commands
We're doing this to allow several new tests:
- xml files (that exist today)
- xml files with substitutions
- xml content (maybe? Currently private. Caching the files seems more readable)
- no data at all

Instead of having only one interface

eppToolVerifier.verifySent("file1.xml", "file2.xml");

we're refactoring to allow:
eppToolVerifier
  .verifySent("file1.xml")
  .verifySentAny() // we don't care about this epps
  .verifySent("file2.xml", substitutions)
  .verifyNoMoreSent();

In this case we're checking that "exactly 3 EPPs were sent, where the 1st one has content from file1.xml, and the 3rd one has the content from file2.xml, after the given substitutions were applied"

This also updates EppToolCommandTestCase to have only one EppToolVerifier, and
always finish by checking verifyNoMoreSent, meaning that in every test - all
sent epps must be accounted for (verified or skiped)

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=177353887
2017-12-01 22:14:06 -05:00
mcilwain
f041b1bac0 Add domain_lock nomulus command
This command is used by registry operators to apply registry locks to
domain names.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=176549874
2017-11-21 18:54:42 -05:00
bbilbo
bbdf9bfc38 Refactor CreateDomainCommand and add UpdateDomainCommand
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=160282921
2017-07-10 11:22:39 -04:00