From d7da112c19dffd1c3c92df38ef6f8c0e82e29b4f Mon Sep 17 00:00:00 2001 From: cgoldfeder Date: Wed, 26 Apr 2017 08:39:07 -0700 Subject: [PATCH] Put back accidentally deleted assertion ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=154300634 --- .../registry/flows/domain/DomainApplicationCreateFlowTest.java | 3 ++- .../google/registry/flows/domain/DomainCreateFlowTest.java | 3 +++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/javatests/google/registry/flows/domain/DomainApplicationCreateFlowTest.java b/javatests/google/registry/flows/domain/DomainApplicationCreateFlowTest.java index 182d112b9..27893067f 100644 --- a/javatests/google/registry/flows/domain/DomainApplicationCreateFlowTest.java +++ b/javatests/google/registry/flows/domain/DomainApplicationCreateFlowTest.java @@ -1524,7 +1524,6 @@ public class DomainApplicationCreateFlowTest @Test public void testFailure_alreadyExists_triggersFailfast() throws Exception { - // This fails fast and throws DomainAlreadyExistsException from init() as a special case. persistContactsAndHosts(); clock.advanceOneMilli(); persistActiveDomain(getUniqueIdFromCommand()); @@ -1536,6 +1535,8 @@ public class DomainApplicationCreateFlowTest getUniqueIdFromCommand()); } catch (ResourceAlreadyExistsException e) { assertThat(e.isFailfast()).isTrue(); + assertAboutEppExceptions().that(e).marshalsToXml().and().hasMessage( + String.format("Object with given ID (%s) already exists", getUniqueIdFromCommand())); } } diff --git a/javatests/google/registry/flows/domain/DomainCreateFlowTest.java b/javatests/google/registry/flows/domain/DomainCreateFlowTest.java index 4f6ac50a6..8af36899f 100644 --- a/javatests/google/registry/flows/domain/DomainCreateFlowTest.java +++ b/javatests/google/registry/flows/domain/DomainCreateFlowTest.java @@ -40,6 +40,7 @@ import static google.registry.testing.DatastoreHelper.persistDeletedDomain; import static google.registry.testing.DatastoreHelper.persistReservedList; import static google.registry.testing.DatastoreHelper.persistResource; import static google.registry.testing.DomainResourceSubject.assertAboutDomains; +import static google.registry.testing.EppExceptionSubject.assertAboutEppExceptions; import static google.registry.testing.MemcacheHelper.setMemcacheContents; import static google.registry.testing.TaskQueueHelper.assertDnsTasksEnqueued; import static google.registry.testing.TaskQueueHelper.assertNoDnsTasksEnqueued; @@ -906,6 +907,8 @@ public class DomainCreateFlowTest extends ResourceFlowTestCase