Deprecated API
Contents
-
Deprecated MethodsMethodDescription
Object.equals(Object)
is not supported. If you meant to compare objects using thisCorrespondence
, useCorrespondence.compare(A, E)
.Object.hashCode()
is not supported.UseDoubleSubject.isWithin(double)
orDoubleSubject.isEqualTo(java.lang.Object)
instead (see documentation for advice).Object.equals(Object)
is not supported on TolerantDoubleComparison. If you meant to compare doubles, useDoubleSubject.TolerantDoubleComparison.of(double)
instead.Object.hashCode()
is not supported on TolerantDoubleComparisonUseFloatSubject.isWithin(float)
orFloatSubject.isEqualTo(java.lang.Object)
instead (see documentation for advice).Object.equals(Object)
is not supported on TolerantFloatComparison. If you meant to compare floats, useFloatSubject.TolerantFloatComparison.of(float)
instead.Object.hashCode()
is not supported on TolerantFloatComparisonUseSubject.isEqualTo(java.lang.Object)
instead. Integer comparison is consistent with equality.You probably meant to callIterableSubject.containsNoneOf(java.lang.Object, java.lang.Object, java.lang.Object...)
instead.You probably meant to callIterableSubject.containsNoneIn(java.lang.Iterable<?>)
instead.UseSubject.isEqualTo(java.lang.Object)
instead. Long comparison is consistent with equality.UseSubject.isEqualTo(java.lang.Object)
instead. String comparison is consistent with equality.Use the other overload, which requires you to supply more information to include in any failure messages.Object.equals(Object)
is not supported on Truth subjects. If you meant to test object equality between an expected and the actual value, useSubject.isEqualTo(Object)
instead.Prefer to constructFact
-style methods, typically by usingfailWithActual
(
simpleFact(...)
)
. However, if you want to preserve your exact failure message as a migration aid, you can inline this method (and then inline the resulting method call, as well).Prefer to constructFact
-style methods, typically by usingSubject.failWithActual(String, Object)
. However, if you want to preserve your exact failure message as a migration aid, you can inline this method (and then inline the resulting method call, as well).Prefer to constructFact
-style methods, typically by usingSubject.failWithActual(Fact, Fact...)
. However, if you want to preserve your exact failure message as a migration aid, you can inline this method.Prefer to constructFact
-style methods, typically by usingSubject.failWithActual(Fact, Fact...)
. However, if you want to preserve your exact failure message as a migration aid, you can inline this method.Prefer to constructFact
-style methods, typically by usingSubject.failWithoutActual(Fact, Fact...)
. However, if you want to preserve your exact failure message as a migration aid, you can inline this method.Prefer to constructFact
-style methods, typically by usingfailWithoutActual
(
simpleFact(...)
)
. However, if you want to preserve your exact failure message as a migration aid, you can inline this method (and then inline the resulting method call, as well).Prefer to constructFact
-style methods, typically by usingfailWithoutActual
(
simpleFact(...)
)
. However, if you want to preserve your exact failure message as a migration aid, you can inline this method.Object.hashCode()
is not supported on Truth subjects.
-
Deprecated ConstructorsConstructorDescriptionConstruct an instance with the static factory methods instead. The most mechanical migration is usually to
Correspondence.from(com.google.common.truth.Correspondence.BinaryPredicate<A, E>, java.lang.String)
.