Re-add EppException marshalling assertions in host flow tests

Apologies for the reformatting, but this refactoring is quite rote and it's
definitely a bigger use of total time to perform the reformatting individually
than to simply do it file-wide.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=179238745
This commit is contained in:
mcilwain 2017-12-15 14:17:32 -08:00 committed by Ben McIlwain
parent e17109a0eb
commit 34699465d5
5 changed files with 514 additions and 390 deletions

View file

@ -17,8 +17,10 @@ package google.registry.flows.host;
import static google.registry.model.eppoutput.CheckData.HostCheck.create;
import static google.registry.testing.DatastoreHelper.persistActiveHost;
import static google.registry.testing.DatastoreHelper.persistDeletedHost;
import static google.registry.testing.JUnitBackports.assertThrows;
import static google.registry.testing.EppExceptionSubject.assertAboutEppExceptions;
import static google.registry.testing.JUnitBackports.expectThrows;
import google.registry.flows.EppException;
import google.registry.flows.ResourceCheckFlowTestCase;
import google.registry.flows.exceptions.TooManyResourceChecksException;
import google.registry.model.host.HostResource;
@ -76,7 +78,8 @@ public class HostCheckFlowTest extends ResourceCheckFlowTestCase<HostCheckFlow,
@Test
public void testTooManyIds() throws Exception {
setEppInput("host_check_51.xml");
assertThrows(TooManyResourceChecksException.class, this::runFlow);
EppException thrown = expectThrows(TooManyResourceChecksException.class, this::runFlow);
assertAboutEppExceptions().that(thrown).marshalsToXml();
}
@Test