Package com.google.common.truth
Class LongSubject
- java.lang.Object
-
- com.google.common.truth.Subject<S,T>
-
- com.google.common.truth.ComparableSubject<LongSubject,java.lang.Long>
-
- com.google.common.truth.LongSubject
-
public class LongSubject extends ComparableSubject<LongSubject,java.lang.Long>
Propositions forlong
subjects.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.google.common.truth.Subject
Subject.HasField
-
-
Field Summary
Fields Modifier and Type Field Description static SubjectFactory<LongSubject,java.lang.Long>
LONG
Deprecated.Use afor each
style loop over yourIterable<Integer>
instead.-
Fields inherited from class com.google.common.truth.Subject
failureStrategy
-
-
Constructor Summary
Constructors Constructor Description LongSubject(FailureStrategy failureStrategy, java.lang.Long subject)
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description void
is(byte other)
void
is(int other)
void
is(short other)
void
isBetween(long lower, long upper)
Deprecated.UseisIn(Range.open(lower, upper))
instead.void
isEqualTo(int other)
void
isEqualTo(java.lang.Object other)
Fails if the subject is not equal to the given object.void
isInclusivelyInRange(long lower, long upper)
Deprecated.UseisIn(Range.closed(lower, upper))
instead.void
isNotEqualTo(java.lang.Object other)
Fails if the subject is equal to the given object.-
Methods inherited from class com.google.common.truth.ComparableSubject
comparesEqualTo, isAtLeast, isAtMost, isGreaterThan, isIn, isLessThan, isNotIn
-
Methods inherited from class com.google.common.truth.Subject
check, equals, fail, fail, fail, failWithBadResults, failWithCustomSubject, failWithoutSubject, failWithRawMessage, getDisplaySubject, getSubject, hasField, hashCode, internalCustomName, is, isA, isInstanceOf, isNotA, isNotInstanceOf, isNotNull, isNotSameAs, isNull, isSameAs, labeled, named
-
-
-
-
Field Detail
-
LONG
@Deprecated public static final SubjectFactory<LongSubject,java.lang.Long> LONG
Deprecated.Use afor each
style loop over yourIterable<Integer>
instead.
-
-
Constructor Detail
-
LongSubject
public LongSubject(FailureStrategy failureStrategy, java.lang.Long subject)
-
-
Method Detail
-
isInclusivelyInRange
@Deprecated public void isInclusivelyInRange(long lower, long upper)
Deprecated.UseisIn(Range.closed(lower, upper))
instead.Attests that a Subjectis inclusively within the lower
andupper
bounds provided or fails.
-
isBetween
@Deprecated public void isBetween(long lower, long upper)
Deprecated.UseisIn(Range.open(lower, upper))
instead.Attests that a Subjectis exclusively within the lower
andupper
bounds provided or fails.
-
isEqualTo
public void isEqualTo(java.lang.Object other)
Description copied from class:Subject
Fails if the subject is not equal to the given object.- Overrides:
isEqualTo
in classSubject<LongSubject,java.lang.Long>
-
isNotEqualTo
public void isNotEqualTo(java.lang.Object other)
Description copied from class:Subject
Fails if the subject is equal to the given object.- Overrides:
isNotEqualTo
in classSubject<LongSubject,java.lang.Long>
-
isEqualTo
public void isEqualTo(int other)
-
is
public void is(int other)
-
is
public void is(short other)
-
is
public void is(byte other)
-
-