mirror of
https://github.com/google/nomulus
synced 2026-09-08 00:57:25 +00:00
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:
@@ -165,7 +165,7 @@ public class TimedTransitionPropertyTest {
|
||||
timedString = forMapify("0", StringTimedTransition.class);
|
||||
// Simulate a load from Datastore by clearing, but don't insert any transitions.
|
||||
timedString.clear();
|
||||
assertThrows(IllegalStateException.class, () -> timedString.checkValidity());
|
||||
assertThrows(IllegalStateException.class, timedString::checkValidity);
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -177,6 +177,6 @@ public class TimedTransitionPropertyTest {
|
||||
// omit a transition corresponding to START_OF_TIME.
|
||||
timedString.clear();
|
||||
timedString.put(DATE_1, transition1);
|
||||
assertThrows(IllegalStateException.class, () -> timedString.checkValidity());
|
||||
assertThrows(IllegalStateException.class, timedString::checkValidity);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user