Package com.google.common.truth
Class LongSubject
Propositions for
long subjects.-
Nested Class Summary
Nested classes/interfaces inherited from class com.google.common.truth.Subject
Subject.EqualityCheck, Subject.Factory<SubjectT extends Subject,ActualT> -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedLongSubject(FailureMetadata metadata, Long actual) Constructor for use by subclasses. -
Method Summary
Modifier and TypeMethodDescriptionfinal voidisAtLeast(int other) Checks that the subject is greater than or equal toother.final voidisAtMost(int other) Checks that the subject is less than or equal toother.final voidDeprecated.final voidisGreaterThan(int other) Checks that the subject is greater thanother.final voidisLessThan(int other) Checks that the subject is less thanother.Methods inherited from class com.google.common.truth.ComparableSubject
isAtLeast, isAtMost, isGreaterThan, isIn, isLessThan, isNotInMethods inherited from class com.google.common.truth.Subject
actual, actualCustomStringRepresentation, actualCustomStringRepresentationForPackageMembersToCall, butWas, check, check, checkNoNeedToDisplayBothValues, equals, fail, fail, fail, failEqualityCheckForEqualsWithoutDescription, failWithActual, failWithActual, failWithActual, failWithActual, failWithBadResults, failWithCustomSubject, failWithoutActual, failWithoutActual, failWithoutActual, failWithoutActual, failWithoutSubject, hashCode, ignoreCheck, isAnyOf, isEqualTo, isIn, isInstanceOf, isNoneOf, isNotEqualTo, isNotIn, isNotInstanceOf, isNotNull, isNotSameInstanceAs, isNull, isSameInstanceAs, toString, typeDescription
-
Constructor Details
-
LongSubject
Constructor for use by subclasses. If you want to create an instance of this class itself, callcheck(...).that(actual).
-
-
Method Details
-
isEquivalentAccordingToCompareTo
Deprecated.UseSubject.isEqualTo(java.lang.Object)instead. Long comparison is consistent with equality.Description copied from class:ComparableSubjectChecks that the subject is equivalent tootheraccording toComparable.compareTo(T), (i.e., checks thata.comparesTo(b) == 0).Note: Do not use this method for checking object equality. Instead, use
Subject.isEqualTo(Object).- Overrides:
isEquivalentAccordingToCompareToin classComparableSubject<Long>
-
isGreaterThan
public final void isGreaterThan(int other) Checks that the subject is greater thanother.To check that the subject is greater than or equal to
other, useisAtLeast(int). -
isLessThan
public final void isLessThan(int other) Checks that the subject is less thanother.To check that the subject is less than or equal to
other, useisAtMost(int). -
isAtMost
public final void isAtMost(int other) Checks that the subject is less than or equal toother.To check that the subject is strictly less than
other, useisLessThan(int). -
isAtLeast
public final void isAtLeast(int other) Checks that the subject is greater than or equal toother.To check that the subject is strictly greater than
other, useisGreaterThan(int).
-
Subject.isEqualTo(java.lang.Object)instead.