google-nomulus/javatests/google/registry/export
cgoldfeder f3a0b78145 Move thrown.expect() right before the throwing statement
aka regexing for fun and profit.

This also makes sure that there are no statements after the
throwing statement, since these would be dead code. There
were a surprising number of places with assertions after
the throw, and none of these are actually triggered in tests
ever. When I found these, I replaced them with try/catch/rethrow
which makes the assertions actually happen:

before:

// This is the ExceptionRule that checks EppException marshaling
thrown.expect(FooException.class);
doThrowingThing();
assertSomething();  // Dead code!

after:

try {
  doThrowingThing();
  assertWithMessage("...").fail();
} catch (FooException e) {
  assertSomething();
  // For EppExceptions:
  assertAboutEppExceptins().that(e).marshalsToXml();
}

To make this work, I added EppExceptionSubject.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=135793407
2016-10-11 11:27:54 -04:00
..
sheet Rename "clientIdentifier" to "clientId" almost everywhere 2016-09-22 14:30:05 -04:00
backup_kinds.txt Add LrpToken to export kinds 2016-08-05 20:38:04 -04:00
BigqueryPollJobActionTest.java Convert entire project to strict lexicographical import sort ordering 2016-07-13 15:59:53 -04:00
BUILD Remove XML test data files that are no longer used in tests 2016-09-26 13:42:44 -04:00
CheckSnapshotServletTest.java Convert entire project to strict lexicographical import sort ordering 2016-07-13 15:59:53 -04:00
DatastoreBackupInfoTest.java Move thrown.expect() right before the throwing statement 2016-10-11 11:27:54 -04:00
DatastoreBackupServiceTest.java Convert entire project to strict lexicographical import sort ordering 2016-07-13 15:59:53 -04:00
ExportConstantsTest.java Convert entire project to strict lexicographical import sort ordering 2016-07-13 15:59:53 -04:00
ExportDomainListsActionTest.java Move thrown.expect() right before the throwing statement 2016-10-11 11:27:54 -04:00
ExportReservedTermsActionTest.java Move thrown.expect() right before the throwing statement 2016-10-11 11:27:54 -04:00
ExportSnapshotServletTest.java Convert entire project to strict lexicographical import sort ordering 2016-07-13 15:59:53 -04:00
ExportUtilsTest.java Convert entire project to strict lexicographical import sort ordering 2016-07-13 15:59:53 -04:00
LoadSnapshotActionTest.java Convert entire project to strict lexicographical import sort ordering 2016-07-13 15:59:53 -04:00
PublishDetailReportActionTest.java Convert entire project to strict lexicographical import sort ordering 2016-07-13 15:59:53 -04:00
SyncGroupMembersActionTest.java Convert entire project to strict lexicographical import sort ordering 2016-07-13 15:59:53 -04:00
UpdateSnapshotViewActionTest.java Convert entire project to strict lexicographical import sort ordering 2016-07-13 15:59:53 -04:00