mirror of
https://github.com/google/nomulus.git
synced 2025-05-13 07:57:13 +02:00
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
This commit is contained in:
parent
0e3d050dae
commit
68768a561f
20 changed files with 285 additions and 190 deletions
|
@ -38,7 +38,7 @@ public class CreateDomainCommandTest extends EppToolCommandTestCase<CreateDomain
|
|||
"--techs=crr-tech",
|
||||
"--password=2fooBAR",
|
||||
"example.tld");
|
||||
eppVerifier().verifySent("domain_create_complete.xml");
|
||||
eppVerifier.verifySent("domain_create_complete.xml");
|
||||
}
|
||||
|
||||
@Test
|
||||
|
@ -50,7 +50,7 @@ public class CreateDomainCommandTest extends EppToolCommandTestCase<CreateDomain
|
|||
"--admins=crr-admin",
|
||||
"--techs=crr-tech",
|
||||
"example.tld");
|
||||
eppVerifier().verifySent("domain_create_minimal.xml");
|
||||
eppVerifier.verifySent("domain_create_minimal.xml");
|
||||
}
|
||||
|
||||
@Test
|
||||
|
@ -62,7 +62,9 @@ public class CreateDomainCommandTest extends EppToolCommandTestCase<CreateDomain
|
|||
"--techs=crr-tech",
|
||||
"example.tld",
|
||||
"example.abc");
|
||||
eppVerifier().verifySent("domain_create_minimal.xml", "domain_create_minimal_abc.xml");
|
||||
eppVerifier
|
||||
.verifySent("domain_create_minimal.xml")
|
||||
.verifySent("domain_create_minimal_abc.xml");
|
||||
}
|
||||
|
||||
@Test
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue