Truth has built in support for the following types:
-
Primitives
-
Arrays
-
Other JDK types
Object- since all types extendObject, you can make simple assertions such as.isEqualTo()on any typeStringComparable- this can be used for anyComparabletype (Instant,BigInteger, etc.)Iterable- this can be used for anyIterabletype (List,Set, etc.)Optional- andOptionalInt,OptionalLong, andOptionalDoubleStream- andIntStream,LongStream(and maybe somedayDoubleStream)MapThrowableClassBigDecimal
-
Guava types
Truth is extensible, so if you don’t see a type you need to make assertions on in this list, you can write your own.