org.assertj.core.api
Class AbstractBooleanAssert<S extends AbstractBooleanAssert<S>>

java.lang.Object
  extended by org.assertj.core.api.AbstractAssert<S,Boolean>
      extended by org.assertj.core.api.AbstractBooleanAssert<S>
Type Parameters:
S - the "self" type of this assertion class. Please read "Emulating 'self types' using Java Generics to simplify fluent API implementation" for more details.
All Implemented Interfaces:
Assert<S,Boolean>, Descriptable<S>, ExtensionPoints<S,Boolean>
Direct Known Subclasses:
BooleanAssert

public abstract class AbstractBooleanAssert<S extends AbstractBooleanAssert<S>>
extends AbstractAssert<S,Boolean>

Base class for all implementations of assertions for Booleans.

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

Field Summary
 
Fields inherited from class org.assertj.core.api.AbstractAssert
actual, info, myself
 
Constructor Summary
protected AbstractBooleanAssert(Boolean actual, Class<?> selfType)
           
 
Method Summary
 S isEqualTo(boolean expected)
          Verifies that the actual value is equal to the given one.
 S isFalse()
          Verifies that the actual value is false.
 S isNotEqualTo(boolean other)
          Verifies that the actual value is not equal to the given one.
 S isTrue()
          Verifies that the actual value is true.
 S usingComparator(Comparator<? super Boolean> customComparator)
          Deprecated. Custom Comparator is not supported for Boolean comparison.
 
Methods inherited from class org.assertj.core.api.AbstractAssert
as, as, describedAs, describedAs, descriptionText, doesNotHave, doesNotHaveSameClassAs, equals, failWithMessage, getWritableAssertionInfo, has, hashCode, hasSameClassAs, inBinary, inHexadecimal, is, isEqualTo, isExactlyInstanceOf, isIn, isIn, isInstanceOf, isInstanceOfAny, isNot, isNotEqualTo, isNotExactlyInstanceOf, isNotIn, isNotIn, isNotInstanceOf, isNotInstanceOfAny, isNotNull, isNotOfAnyClassIn, isNotSameAs, isNull, isOfAnyClassIn, isSameAs, overridingErrorMessage, usingDefaultComparator
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractBooleanAssert

protected AbstractBooleanAssert(Boolean actual,
                                Class<?> selfType)
Method Detail

isTrue

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

Returns:
this assertion object.
Throws:
AssertionError - if the actual value is null.
AssertionError - if the actual value is not true.

isFalse

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

Returns:
this assertion object.
Throws:
AssertionError - if the actual value is null.
AssertionError - if the actual value is not false.

isEqualTo

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

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

isNotEqualTo

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

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

usingComparator

@Deprecated
public final S usingComparator(Comparator<? super Boolean> customComparator)
Deprecated. Custom Comparator is not supported for Boolean comparison.

Do not use this method.

Specified by:
usingComparator in interface Assert<S extends AbstractBooleanAssert<S>,Boolean>
Overrides:
usingComparator in class AbstractAssert<S extends AbstractBooleanAssert<S>,Boolean>
Parameters:
customComparator - the comparator to use for incoming assertion checks.
Returns:
this assertion object.
Throws:
UnsupportedOperationException - if this method is called.


Copyright © 2013–2015 AssertJ. All rights reserved.