google-nomulus/javatests/google/registry/model
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
..
billing Move thrown.expect() right before the throwing statement 2016-10-11 11:27:54 -04:00
common Move thrown.expect() right before the throwing statement 2016-10-11 11:27:54 -04:00
contact Change @DoNotHydrate to work on fields, not types. 2016-10-11 11:27:54 -04:00
domain Change @DoNotHydrate to work on fields, not types. 2016-10-11 11:27:54 -04:00
eppoutput Rename Java packages to use the .google TLD 2016-05-13 20:04:42 -04:00
export Convert entire project to strict lexicographical import sort ordering 2016-07-13 15:59:53 -04:00
host Change @DoNotHydrate to work on fields, not types. 2016-10-11 11:27:54 -04:00
index Always use the constructor to make Immutable Collection Builders 2016-10-07 14:37:02 -04:00
mark Convert entire project to strict lexicographical import sort ordering 2016-07-13 15:59:53 -04:00
ofy Fix all uses of DateTime.now() to use DateTimeZone.UTC 2016-10-03 16:43:53 -04:00
poll Handle nullness properly in some message/flow/poll code 2016-07-15 14:58:57 -04:00
rde Convert entire project to strict lexicographical import sort ordering 2016-07-13 15:59:53 -04:00
registrar Rename "clientIdentifier" to "clientId" almost everywhere 2016-09-22 14:30:05 -04:00
registry Refactor Fee class to support EAP fee 2016-09-22 14:03:01 -04:00
reporting Convert entire project to strict lexicographical import sort ordering 2016-07-13 15:59:53 -04:00
server Convert entire project to strict lexicographical import sort ordering 2016-07-13 15:59:53 -04:00
smd Convert entire project to strict lexicographical import sort ordering 2016-07-13 15:59:53 -04:00
tmch Use smaller shard size in ClaimsListShardTest 2016-09-14 15:16:22 -04:00
transfer DeReference the codebase 2016-09-02 13:50:20 -04:00
translators DeReference the codebase 2016-09-02 13:50:20 -04:00
BUILD Handle nullness properly in some message/flow/poll code 2016-07-15 14:58:57 -04:00
CreateAutoTimestampTest.java Convert entire project to strict lexicographical import sort ordering 2016-07-13 15:59:53 -04:00
EntityClassesTest.java Convert entire project to strict lexicographical import sort ordering 2016-07-13 15:59:53 -04:00
EntityTestCase.java Convert entire project to strict lexicographical import sort ordering 2016-07-13 15:59:53 -04:00
EppResourceUtilsTest.java DeReference the codebase 2016-09-02 13:50:20 -04:00
ImmutableObjectTest.java Change @DoNotHydrate to work on fields, not types. 2016-10-11 11:27:54 -04:00
ModelUtilsTest.java Change @DoNotHydrate to work on fields, not types. 2016-10-11 11:27:54 -04:00
ResourceCommandTestCase.java Rename Java packages to use the .google TLD 2016-05-13 20:04:42 -04:00
RoidSuffixesTest.java Convert entire project to strict lexicographical import sort ordering 2016-07-13 15:59:53 -04:00
schema.txt Fix build by adding missing LrpToken.metadata field to schema file 2016-10-07 15:29:47 -04:00
SchemaVersionTest.java Convert entire project to strict lexicographical import sort ordering 2016-07-13 15:59:53 -04:00
UpdateAutoTimestampTest.java Convert entire project to strict lexicographical import sort ordering 2016-07-13 15:59:53 -04:00