mirror of
https://github.com/google/nomulus.git
synced 2025-07-11 21:48:18 +02:00
Refactor assertCommandAndResponse to be "fluent"
This is in preparation for automatic EPP consolidation. The assertion will now look like: assertThatCommand("file.xml"[, substitution]) .atTime(time) .hasResponse("file2.xml"[, substitution]); Also, added convenience functions for often reused commands (login and logout) ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=190617505
This commit is contained in:
parent
c1ca88ac9e
commit
422ec9b97a
15 changed files with 892 additions and 1054 deletions
|
@ -34,14 +34,14 @@ public class EppLifecycleLoginTest extends EppTestCase {
|
|||
|
||||
@Test
|
||||
public void testLoginAndLogout_recordsEppMetric() throws Exception {
|
||||
assertCommandAndResponse("login_valid.xml", "login_response.xml");
|
||||
assertThatLoginSucceeds("NewRegistrar", "foo-BAR2");
|
||||
assertThat(getRecordedEppMetric())
|
||||
.hasClientId("NewRegistrar")
|
||||
.and()
|
||||
.hasCommandName("Login")
|
||||
.and()
|
||||
.hasStatus(SUCCESS);
|
||||
assertCommandAndResponse("logout.xml", "logout_response.xml");
|
||||
assertThatLogoutSucceeds();
|
||||
assertThat(getRecordedEppMetric())
|
||||
.hasClientId("NewRegistrar")
|
||||
.and()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue