Package com.google.common.truth
Class IntegerSubject
- java.lang.Object
-
- com.google.common.truth.Subject<S,T>
-
- com.google.common.truth.ComparableSubject<IntegerSubject,java.lang.Integer>
-
- com.google.common.truth.IntegerSubject
-
public class IntegerSubject extends ComparableSubject<IntegerSubject,java.lang.Integer>
Propositions forInteger
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<IntegerSubject,java.lang.Integer>
INTEGER
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 IntegerSubject(FailureStrategy failureStrategy, java.lang.Integer integer)
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description void
is(byte other)
void
is(long other)
void
is(short other)
void
isBetween(int lower, int upper)
Deprecated.UseisIn(Range.open(lower, upper))
instead.void
isEqualTo(long other)
void
isEqualTo(java.lang.Object other)
Fails if the subject is not equal to the given object.void
isInclusivelyInRange(int lower, int 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
-
INTEGER
@Deprecated public static final SubjectFactory<IntegerSubject,java.lang.Integer> INTEGER
Deprecated.Use afor each
style loop over yourIterable<Integer>
instead.
-
-
Constructor Detail
-
IntegerSubject
public IntegerSubject(FailureStrategy failureStrategy, java.lang.Integer integer)
-
-
Method Detail
-
isInclusivelyInRange
@Deprecated public void isInclusivelyInRange(int lower, int upper)
Deprecated.UseisIn(Range.closed(lower, upper))
instead.Attests that the int is inclusively within thelower
andupper
bounds provided or fails.
-
isBetween
@Deprecated public void isBetween(int lower, int upper)
Deprecated.UseisIn(Range.open(lower, upper))
instead.Attests that the int is exclusively within thelower
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<IntegerSubject,java.lang.Integer>
-
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<IntegerSubject,java.lang.Integer>
-
isEqualTo
public void isEqualTo(long other)
-
is
public void is(long other)
-
is
public void is(short other)
-
is
public void is(byte other)
-
-