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`.

PiperOrigin-RevId: 604763576
  • Loading branch information
cpovirk authored and Dagger Team committed Feb 6, 2024
1 parent 76cebe1 commit d7a55be
Showing 1 changed file with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
package dagger.functional.kotlinsrc.assisted

import com.google.common.truth.Truth.assertThat
import com.google.common.truth.Truth8
import dagger.Binds
import dagger.BindsInstance
import dagger.BindsOptionalOf
Expand Down Expand Up @@ -169,10 +168,10 @@ internal class AssistedFactoryAsQualifiedBindingTest {
assertThat(foo.barFactoryAsBinds).isEqualTo(barFactory)

// Test injection of a qualified Bar/BarFactory with custom @BindsOptionalOf implementation
Truth8.assertThat(foo.optionalBar).isPresent()
Truth8.assertThat(foo.optionalBar).hasValue(bar)
Truth8.assertThat(foo.optionalBarFactory).isPresent()
Truth8.assertThat(foo.optionalBarFactory).hasValue(barFactory)
assertThat(foo.optionalBar).isPresent()
assertThat(foo.optionalBar).hasValue(bar)
assertThat(foo.optionalBarFactory).isPresent()
assertThat(foo.optionalBarFactory).hasValue(barFactory)

// Test injection of a qualified Bar/BarFactory as multibinding
assertThat(foo.barSet).containsExactly(bar)
Expand Down

0 comments on commit d7a55be

Please sign in to comment.