mirror of
https://github.com/google/nomulus
synced 2026-02-07 05:21:15 +00:00
Add more absent clTrid unit tests
In RFC 5730, clTrid is specified as optional. We ran into an error earlier this year in which a registrar was not passing a client transaction id and we didn't handle it correctly. So, this CL adds some tests of common EPP operations verify that they work correctly when the clTrid is not specified. This also slightly improves some flow logic to make it more obvious at first glance that clTrid is indeed optional. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=202000845
This commit is contained in:
@@ -35,7 +35,7 @@ public class EppInputTest {
|
||||
public void testUnmarshalling_contactInfo() throws Exception {
|
||||
EppInput input =
|
||||
unmarshal(EppInput.class, loadBytes(ContactResourceTest.class, "contact_info.xml").read());
|
||||
assertThat(input.getCommandWrapper().getClTrid()).isEqualTo("ABC-12345");
|
||||
assertThat(input.getCommandWrapper().getClTrid()).hasValue("ABC-12345");
|
||||
assertThat(input.getCommandType()).isEqualTo("info");
|
||||
assertThat(input.getResourceType()).hasValue("contact");
|
||||
assertThat(input.getSingleTargetId()).hasValue("sh8013");
|
||||
@@ -46,7 +46,7 @@ public class EppInputTest {
|
||||
public void testUnmarshalling_domainCheck() throws Exception {
|
||||
EppInput input =
|
||||
unmarshal(EppInput.class, loadBytes(DomainResourceTest.class, "domain_check.xml").read());
|
||||
assertThat(input.getCommandWrapper().getClTrid()).isEqualTo("ABC-12345");
|
||||
assertThat(input.getCommandWrapper().getClTrid()).hasValue("ABC-12345");
|
||||
assertThat(input.getCommandType()).isEqualTo("check");
|
||||
assertThat(input.getResourceType()).hasValue("domain");
|
||||
assertThat(input.getSingleTargetId()).isEmpty();
|
||||
@@ -56,7 +56,7 @@ public class EppInputTest {
|
||||
@Test
|
||||
public void testUnmarshalling_login() throws Exception {
|
||||
EppInput input = unmarshal(EppInput.class, loadBytes(getClass(), "login_valid.xml").read());
|
||||
assertThat(input.getCommandWrapper().getClTrid()).isEqualTo("ABC-12345");
|
||||
assertThat(input.getCommandWrapper().getClTrid()).hasValue("ABC-12345");
|
||||
assertThat(input.getCommandType()).isEqualTo("login");
|
||||
assertThat(input.getResourceType()).isEmpty();
|
||||
assertThat(input.getSingleTargetId()).isEmpty();
|
||||
|
||||
Reference in New Issue
Block a user