com.google.common.truth
Class IntegerSubject

java.lang.Object
  extended by com.google.common.truth.Subject<IntegerSubject,Long>
      extended by com.google.common.truth.IntegerSubject

public class IntegerSubject
extends Subject<IntegerSubject,Long>

Propositions for Integral numeric subjects

Author:
David Saff, Christian Gruber (cgruber@israfil.net)

Nested Class Summary
 
Nested classes/interfaces inherited from class com.google.common.truth.Subject
Subject.HasField
 
Field Summary
static SubjectFactory<IntegerSubject,Long> INTEGER
           
 
Fields inherited from class com.google.common.truth.Subject
failureStrategy
 
Constructor Summary
IntegerSubject(FailureStrategy failureStrategy, Integer i)
           
IntegerSubject(FailureStrategy failureStrategy, Long i)
           
 
Method Summary
 void is(byte other)
           
 void is(int other)
           
 void is(short other)
           
 void isBetween(long lower, long upper)
          Attests that a Subject is exclusively within the lower and upper bounds provided or fails.
 void isEqualTo(Integer other)
           
 void isEqualTo(Long other)
           
 void isInclusivelyInRange(long lower, long upper)
          Attests that a Subject is inclusively within the lower and upper bounds provided or fails.
 void isNotEqualTo(Integer other)
           
 void isNotEqualTo(Long other)
           
 
Methods inherited from class com.google.common.truth.Subject
check, equals, fail, failWithBadResults, failWithCustomSubject, failWithoutSubject, failWithRawMessage, getDisplaySubject, getSubject, hasField, hashCode, internalCustomName, is, isA, isEqualTo, isNotA, isNotEqualTo, isNotNull, isNull, labeled, named
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

INTEGER

public static final SubjectFactory<IntegerSubject,Long> INTEGER
Constructor Detail

IntegerSubject

public IntegerSubject(FailureStrategy failureStrategy,
                      Long i)

IntegerSubject

public IntegerSubject(FailureStrategy failureStrategy,
                      Integer i)
Method Detail

isInclusivelyInRange

public void isInclusivelyInRange(long lower,
                                 long upper)
Attests that a Subject is inclusively within the lower and upper bounds provided or fails.

Throws:
IllegalArgumentException - if the lower bound is greater than the upper.

isBetween

public void isBetween(long lower,
                      long upper)
Attests that a Subject is exclusively within the lower and upper bounds provided or fails.

Throws:
IllegalArgumentException - if the lower bound is greater than the upper.

isEqualTo

public void isEqualTo(Integer other)

isEqualTo

public void isEqualTo(Long other)

isNotEqualTo

public void isNotEqualTo(Integer other)

isNotEqualTo

public void isNotEqualTo(Long other)

is

public void is(int other)

is

public void is(short other)

is

public void is(byte other)


Copyright © 2014. All rights reserved.