Migrate from is(Not)SameAs to is(Not)SameInstanceAs.

They behave identically, and the old names are being removed.

Open-source note: The new methods are available in Truth as of version 0.44.

END_PUBLIC

More information:
  []

Tested:
    TAP --sample ran all affected tests and none failed
    []

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=246550001
This commit is contained in:
cpovirk 2019-05-03 12:02:43 -07:00 committed by jianglai
parent e6e6303b9e
commit 7cb6d23884
4 changed files with 11 additions and 10 deletions

View file

@ -107,7 +107,7 @@ public final class LockHandlerImplTest {
assertThrows(
RuntimeException.class,
() -> executeWithLocks(new ThrowingCallable(expectedException, clock), lock));
assertThat(exception).isSameAs(expectedException);
assertThat(exception).isSameInstanceAs(expectedException);
verify(lock, times(1)).release();
}
@ -119,7 +119,7 @@ public final class LockHandlerImplTest {
assertThrows(
RuntimeException.class,
() -> executeWithLocks(new ThrowingCallable(expectedException, clock), lock));
assertThat(thrown).hasCauseThat().isSameAs(expectedException);
assertThat(thrown).hasCauseThat().isSameInstanceAs(expectedException);
assertThat(thrown)
.hasMessageThat()
.isEqualTo(
@ -136,7 +136,7 @@ public final class LockHandlerImplTest {
assertThrows(
RuntimeException.class,
() -> executeWithLocks(new ThrowingCallable(expectedException, clock), lock));
assertThat(exception).hasCauseThat().isSameAs(expectedException);
assertThat(exception).hasCauseThat().isSameInstanceAs(expectedException);
verify(lock, times(1)).release();
}