org.fest.assertions
Class ShortAssert

java.lang.Object
  extended by org.fest.assertions.Assert
      extended by org.fest.assertions.GenericAssert<ShortAssert,Short>
          extended by org.fest.assertions.ShortAssert
All Implemented Interfaces:
NumberAssert

public class ShortAssert
extends GenericAssert<ShortAssert,Short>
implements NumberAssert

Assertions for Shorts and shorts.

To create a new instance of this class invoke either Assertions.assertThat(Short) Assertions.assertThat(short).

Author:
Yvonne Wang, David DIDIER, Ansgar Konermann, Alex Ruiz

Field Summary
 
Fields inherited from class org.fest.assertions.GenericAssert
actual, myself
 
Constructor Summary
protected ShortAssert(short actual)
          Creates a new ShortAssert.
protected ShortAssert(Short actual)
          Creates a new ShortAssert.
 
Method Summary
 ShortAssert isEqualTo(short expected)
          Verifies that the actual Short is equal to the given one.
 ShortAssert isGreaterThan(short other)
          Verifies that the actual Short is greater than the given one.
 ShortAssert isGreaterThanOrEqualTo(short other)
          Verifies that the actual Short is greater or equal to the given one.
 ShortAssert isLessThan(short other)
          Verifies that the actual Short is less than the given one.
 ShortAssert isLessThanOrEqualTo(short other)
          Verifies that the actual Short is less or equal to the given one.
 ShortAssert isNegative()
          Verifies that the actual Short is negative.
 ShortAssert isNotEqualTo(short other)
          Verifies that the actual Short is not equal to the given one.
 ShortAssert isPositive()
          Verifies that the actual Short is positive.
 ShortAssert isZero()
          Verifies that the actual Short is equal to zero.
 
Methods inherited from class org.fest.assertions.GenericAssert
as, as, describedAs, describedAs, doesNotSatisfy, is, isEqualTo, isIn, isIn, isNot, isNotEqualTo, isNotIn, isNotIn, isNotNull, isNotSameAs, isNull, isSameAs, overridingErrorMessage, satisfies
 
Methods inherited from class org.fest.assertions.Assert
customErrorMessage, description, description, description, equals, fail, fail, failIfCustomMessageIsSet, failIfCustomMessageIsSet, failure, formattedErrorMessage, hashCode, rawDescription, replaceDefaultErrorMessagesWith
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ShortAssert

protected ShortAssert(short actual)
Creates a new ShortAssert.

Parameters:
actual - the actual value to verify.

ShortAssert

protected ShortAssert(Short actual)
Creates a new ShortAssert.

Parameters:
actual - the actual value to verify.
Method Detail

isEqualTo

public ShortAssert isEqualTo(short expected)
Verifies that the actual Short is equal to the given one.

Parameters:
expected - the value to compare the actual one to.
Returns:
this assertion object.
Throws:
AssertionError - if the actual Short is not equal to the given one.

isNotEqualTo

public ShortAssert isNotEqualTo(short other)
Verifies that the actual Short is not equal to the given one.

Parameters:
other - the given value.
Returns:
this assertion object.
Throws:
AssertionError - if the actual Short is equal to the given one.

isGreaterThan

public ShortAssert isGreaterThan(short other)
Verifies that the actual Short is greater than the given one.

Parameters:
other - the given value.
Returns:
this assertion object.
Throws:
AssertionError - if the actual Short is not greater than the given one.

isLessThan

public ShortAssert isLessThan(short other)
Verifies that the actual Short is less than the given one.

Parameters:
other - the given value.
Returns:
this assertion object.
Throws:
AssertionError - if the actual Short is not less than the given one.

isGreaterThanOrEqualTo

public ShortAssert isGreaterThanOrEqualTo(short other)
Verifies that the actual Short is greater or equal to the given one.

Parameters:
other - the given value.
Returns:
this assertion object.
Throws:
AssertionError - if the actual Short is not greater than or equal to the given one.

isLessThanOrEqualTo

public ShortAssert isLessThanOrEqualTo(short other)
Verifies that the actual Short is less or equal to the given one.

Parameters:
other - the given value.
Returns:
this assertion object.
Throws:
AssertionError - if the actual Short is not less than or equal to the given one.

isZero

public ShortAssert isZero()
Verifies that the actual Short is equal to zero.

Specified by:
isZero in interface NumberAssert
Returns:
this assertion object.
Throws:
AssertionError - if the actual Short is not equal to zero.

isPositive

public ShortAssert isPositive()
Verifies that the actual Short is positive.

Specified by:
isPositive in interface NumberAssert
Returns:
this assertion object.
Throws:
AssertionError - if the actual Short is not positive.

isNegative

public ShortAssert isNegative()
Verifies that the actual Short is negative.

Specified by:
isNegative in interface NumberAssert
Returns:
this assertion object.
Throws:
AssertionError - if the actual Short is not negative.


Copyright © 2007-2011 FEST (Fixtures for Easy Software Testing). All Rights Reserved.