Modernize and improve `TruthAssertThatTest.java`.

The old code had a method name that claimed to produce a `TypeToken` for a method return type but actually returned it for the single parameter of the input method. Anyway, we can check both the return type and the parameter type, and we can do that just by converting those generic types to strings. Those strings aren't exactly specified, but the same type will certainly produce the same string, and in practice the strings are unambiguous. (Two different types won't have the same `Type.toString()`.) So no need for `TypeToken`.

RELNOTES=n/a
PiperOrigin-RevId: 797792994
1 file changed
tree: ab33f2241b5f177a193f2f8b9b5e01591e8bc368
  1. .github/
  2. core/
  3. extensions/
  4. javadoc-link/
  5. refactorings/
  6. util/
  7. .gitignore
  8. CONTRIBUTING.md
  9. LICENSE
  10. overview.html
  11. pom.xml
  12. README.md
README.md

Main Site Build Status Maven Release Stackoverflow

What is Truth?

Truth makes your test assertions and failure messages more readable. Similar to AssertJ, it natively supports many JDK and Guava types, and it is extensible to others.

Truth is owned and maintained by the Guava team. It is used in the majority of the tests in Google’s own codebase.

Read more at the main website.