org.fest.assertions
Class BooleanAssert

java.lang.Object
  extended by org.fest.assertions.Assert
      extended by org.fest.assertions.GenericAssert<BooleanAssert,Boolean>
          extended by org.fest.assertions.BooleanAssert

public class BooleanAssert
extends GenericAssert<BooleanAssert,Boolean>

Assertions for Booleans and booleans.

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

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

Field Summary
 
Fields inherited from class org.fest.assertions.GenericAssert
actual, myself
 
Constructor Summary
protected BooleanAssert(boolean actual)
          Creates a new BooleanAssert.
protected BooleanAssert(Boolean actual)
          Creates a new BooleanAssert.
 
Method Summary
 BooleanAssert isEqualTo(boolean expected)
          Verifies that the actual Boolean is equal to the given one.
 void isFalse()
          Verifies that the actual Boolean value is false.
 BooleanAssert isNotEqualTo(boolean other)
          Verifies that the actual Boolean is not equal to the given one.
 void isTrue()
          Verifies that the actual Boolean value is true.
 
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

BooleanAssert

protected BooleanAssert(boolean actual)
Creates a new BooleanAssert.

Parameters:
actual - the actual value to verify.

BooleanAssert

protected BooleanAssert(Boolean actual)
Creates a new BooleanAssert.

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

isTrue

public void isTrue()
Verifies that the actual Boolean value is true.

Throws:
AssertionError - if the actual Boolean value is false.

isFalse

public void isFalse()
Verifies that the actual Boolean value is false.

Throws:
AssertionError - if the actual Boolean value is true.

isEqualTo

public BooleanAssert isEqualTo(boolean expected)
Verifies that the actual Boolean is equal to the given one.

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

isNotEqualTo

public BooleanAssert isNotEqualTo(boolean other)
Verifies that the actual Boolean is not equal to the given one.

Parameters:
other - the given boolean to compare the actual Boolean to.
Returns:
this assertion object.
Throws:
AssertionError - if the actual Boolean is equal to the given one.


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