Use method references instead of lambdas when possible

The assertThrows/expectThrows refactoring script does not use method
references, apparently.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=179089048
This commit is contained in:
mcilwain 2017-12-14 13:40:15 -08:00 committed by Ben McIlwain
parent e619ea1bff
commit fbe11ff33c
35 changed files with 483 additions and 483 deletions

View file

@ -102,20 +102,20 @@ public class DomainClaimsCheckFlowTest
@Test
public void testFailure_TooManyIds() throws Exception {
setEppInput("domain_check_claims_51.xml");
assertThrows(TooManyResourceChecksException.class, () -> runFlow());
assertThrows(TooManyResourceChecksException.class, this::runFlow);
}
@Test
public void testFailure_tldDoesntExist() throws Exception {
setEppInput("domain_check_claims_bad_tld.xml");
assertThrows(TldDoesNotExistException.class, () -> runFlow());
assertThrows(TldDoesNotExistException.class, this::runFlow);
}
@Test
public void testFailure_notAuthorizedForTld() throws Exception {
persistResource(
loadRegistrar("TheRegistrar").asBuilder().setAllowedTlds(ImmutableSet.of()).build());
assertThrows(NotAuthorizedForTldException.class, () -> runFlow());
assertThrows(NotAuthorizedForTldException.class, this::runFlow);
}
@Test
@ -136,7 +136,7 @@ public class DomainClaimsCheckFlowTest
createTld("tld", TldState.PREDELEGATION);
persistResource(Registry.get("tld").asBuilder().build());
setEppInput("domain_check_claims.xml");
assertThrows(BadCommandForRegistryPhaseException.class, () -> runFlow());
assertThrows(BadCommandForRegistryPhaseException.class, this::runFlow);
}
@Test
@ -144,7 +144,7 @@ public class DomainClaimsCheckFlowTest
createTld("tld", TldState.SUNRISE);
persistResource(Registry.get("tld").asBuilder().build());
setEppInput("domain_check_claims.xml");
assertThrows(DomainClaimsCheckNotAllowedInSunrise.class, () -> runFlow());
assertThrows(DomainClaimsCheckNotAllowedInSunrise.class, this::runFlow);
}
@Test
@ -154,7 +154,7 @@ public class DomainClaimsCheckFlowTest
persistResource(
Registry.get("tld2").asBuilder().setClaimsPeriodEnd(clock.nowUtc().minusMillis(1)).build());
setEppInput("domain_check_claims_multiple_tlds.xml");
assertThrows(ClaimsPeriodEndedException.class, () -> runFlow());
assertThrows(ClaimsPeriodEndedException.class, this::runFlow);
}
@Test