Skip to content

Commit

Permalink
Migrate usages of Truth8.assertThat to equivalent usages of `Truth.…
Browse files Browse the repository at this point in the history
…assertThat`.

The `Truth8` methods will be deprecated (or hidden) in the future. Callers should move to `Truth`.

Some (but not all) of the CLs in this batch require Truth [1.4.0](https://github.com/google/truth/releases/tag/v1.4.0). I submitted a CL earlier today to (I hope) perform that upgrade for your project.

PiperOrigin-RevId: 604731456
  • Loading branch information
cpovirk authored and Guice Team committed Feb 6, 2024
1 parent a7c5944 commit 1ddec22
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions core/test/com/google/inject/util/EnhancedTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import static com.google.common.truth.Truth.assertThat;
import static org.junit.Assume.assumeTrue;

import com.google.common.truth.Truth8;
import com.google.inject.AbstractModule;
import com.google.inject.Guice;
import com.google.inject.Injector;
Expand Down Expand Up @@ -46,8 +45,8 @@ public void unenhancedClass() {
assertThat(bar.bar()).isEqualTo("bar");

// The actual tests.
Truth8.assertThat(Enhanced.unenhancedClass(foo.getClass())).isEqualTo(Optional.of(Foo.class));
Truth8.assertThat(Enhanced.unenhancedClass(bar.getClass())).isEmpty();
assertThat(Enhanced.unenhancedClass(foo.getClass())).isEqualTo(Optional.of(Foo.class));
assertThat(Enhanced.unenhancedClass(bar.getClass())).isEmpty();
}

private static class InterceptingModule extends AbstractModule {
Expand Down

0 comments on commit 1ddec22

Please sign in to comment.