Unify two exceptions that mean the same thing

These were historically separate due to the old flow
structure, but now they should be one exception.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=133984858
This commit is contained in:
cgoldfeder 2016-09-22 12:24:54 -07:00 committed by Ben McIlwain
parent 21a98b899c
commit 096877f03e
55 changed files with 163 additions and 211 deletions

View file

@ -24,7 +24,7 @@ import static google.registry.testing.DatastoreHelper.persistResource;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableSet;
import google.registry.flows.ResourceFlowTestCase;
import google.registry.flows.exceptions.ResourceToQueryDoesNotExistException;
import google.registry.flows.ResourceFlowUtils.ResourceDoesNotExistException;
import google.registry.model.contact.ContactAddress;
import google.registry.model.contact.ContactAuthInfo;
import google.registry.model.contact.ContactPhoneNumber;
@ -164,7 +164,7 @@ public class ContactInfoFlowTest extends ResourceFlowTestCase<ContactInfoFlow, C
@Test
public void testFailure_neverExisted() throws Exception {
thrown.expect(
ResourceToQueryDoesNotExistException.class,
ResourceDoesNotExistException.class,
String.format("(%s)", getUniqueIdFromCommand()));
runFlow();
}
@ -172,7 +172,7 @@ public class ContactInfoFlowTest extends ResourceFlowTestCase<ContactInfoFlow, C
@Test
public void testFailure_existedButWasDeleted() throws Exception {
thrown.expect(
ResourceToQueryDoesNotExistException.class,
ResourceDoesNotExistException.class,
String.format("(%s)", getUniqueIdFromCommand()));
persistContactResource(false);
runFlow();