org.fest.assertions
Class ByteAssert

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

public class ByteAssert
extends GenericAssert<ByteAssert,Byte>
implements NumberAssert

Assertions for Bytes and bytes.

To create a new instance of this class invoke either Assertions.assertThat(Byte) or Assertions.assertThat(byte).

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

Field Summary
 
Fields inherited from class org.fest.assertions.GenericAssert
actual, myself
 
Constructor Summary
protected ByteAssert(byte actual)
          Creates a new ByteAssert.
protected ByteAssert(Byte actual)
          Creates a new ByteAssert.
 
Method Summary
 ByteAssert isEqualTo(byte expected)
          Verifies that the actual Byte value is equal to the given one.
 ByteAssert isGreaterThan(byte other)
          Verifies that the actual Byte value is greater than the given one.
 ByteAssert isGreaterThanOrEqualTo(byte other)
          Verifies that the actual Byte value is greater or equal to the given one.
 ByteAssert isLessThan(byte other)
          Verifies that the actual Byte value is less than the given one.
 ByteAssert isLessThanOrEqualTo(byte other)
          Verifies that the actual Byte value is less or equal to the given one.
 ByteAssert isNegative()
          Verifies that the actual Byte value is negative.
 ByteAssert isNotEqualTo(byte other)
          Verifies that the actual Byte value is not equal to the given one.
 ByteAssert isPositive()
          Verifies that the actual Byte value is positive.
 ByteAssert isZero()
          Verifies that the actual Byte value 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

ByteAssert

protected ByteAssert(byte actual)
Creates a new ByteAssert.

Parameters:
actual - the actual value to verify.

ByteAssert

protected ByteAssert(Byte actual)
Creates a new ByteAssert.

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

isEqualTo

public ByteAssert isEqualTo(byte expected)
Verifies that the actual Byte value 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 Byte value is not equal to the given one.

isNotEqualTo

public ByteAssert isNotEqualTo(byte other)
Verifies that the actual Byte value is not equal to the given one.

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

isGreaterThan

public ByteAssert isGreaterThan(byte other)
Verifies that the actual Byte value is greater than the given one.

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

isLessThan

public ByteAssert isLessThan(byte other)
Verifies that the actual Byte value is less than the given one.

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

isGreaterThanOrEqualTo

public ByteAssert isGreaterThanOrEqualTo(byte other)
Verifies that the actual Byte value is greater or equal to the given one.

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

isLessThanOrEqualTo

public ByteAssert isLessThanOrEqualTo(byte other)
Verifies that the actual Byte value is less or equal to the given one.

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

isZero

public ByteAssert isZero()
Verifies that the actual Byte value is equal to zero.

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

isPositive

public ByteAssert isPositive()
Verifies that the actual Byte value is positive.

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

isNegative

public ByteAssert isNegative()
Verifies that the actual Byte value is negative.

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


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