org.fest.assertions
Class BooleanArrayAssert

java.lang.Object
  extended by org.fest.assertions.Assert
      extended by org.fest.assertions.GenericAssert<S,A>
          extended by org.fest.assertions.GroupAssert<S,A>
              extended by org.fest.assertions.ItemGroupAssert<S,A>
                  extended by org.fest.assertions.ArrayAssert<BooleanArrayAssert,boolean[]>
                      extended by org.fest.assertions.BooleanArrayAssert

public class BooleanArrayAssert
extends ArrayAssert<BooleanArrayAssert,boolean[]>

Assertions for boolean arrays.

To create a new instance of this class invoke Assertions.assertThat(boolean[]).

Author:
Yvonne Wang, Alex Ruiz

Field Summary
 
Fields inherited from class org.fest.assertions.GenericAssert
actual, myself
 
Constructor Summary
protected BooleanArrayAssert(boolean... actual)
          Creates a new BooleanArrayAssert.
 
Method Summary
 BooleanArrayAssert contains(boolean... values)
          Verifies that the actual boolean array contains the given values.
 BooleanArrayAssert containsOnly(boolean... values)
          Verifies that the actual boolean array contains the given values only.
 BooleanArrayAssert excludes(boolean... values)
          Verifies that the actual boolean array does not contain the given values.
 BooleanArrayAssert isEqualTo(boolean[] expected)
          Verifies that the actual boolean array is equal to the given array.
 BooleanArrayAssert isNotEqualTo(boolean[] array)
          Verifies that the actual boolean array is not equal to the given array.
 
Methods inherited from class org.fest.assertions.ArrayAssert
actualAsList, actualAsSet, actualGroupSize
 
Methods inherited from class org.fest.assertions.ItemGroupAssert
assertContains, assertContainsOnly, assertDoesNotHaveDuplicates, assertExcludes, validateIsNotNull
 
Methods inherited from class org.fest.assertions.GroupAssert
hasSize, isEmpty, isNotEmpty, isNullOrEmpty
 
Methods inherited from class org.fest.assertions.GenericAssert
as, as, describedAs, describedAs, doesNotSatisfy, is, isIn, isIn, isNot, 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

BooleanArrayAssert

protected BooleanArrayAssert(boolean... actual)
Creates a new BooleanArrayAssert.

Parameters:
actual - the target to verify.
Method Detail

contains

public BooleanArrayAssert contains(boolean... values)
Verifies that the actual boolean array contains the given values.

Parameters:
values - the values to look for.
Returns:
this assertion object.
Throws:
AssertionError - if the actual boolean array is null.
NullPointerException - if the given boolean array is null.
AssertionError - if the actual boolean array does not contain the given values.

containsOnly

public BooleanArrayAssert containsOnly(boolean... values)
Verifies that the actual boolean array contains the given values only.

Parameters:
values - the values to look for.
Returns:
this assertion object.
Throws:
AssertionError - if the actual boolean array is null.
NullPointerException - if the given boolean array is null.
AssertionError - if the actual boolean array does not contain the given objects, or if the actual boolean array contains elements other than the ones specified.

excludes

public BooleanArrayAssert excludes(boolean... values)
Verifies that the actual boolean array does not contain the given values.

Parameters:
values - the values the array should exclude.
Returns:
this assertion object.
Throws:
AssertionError - if the actual boolean array is null.
NullPointerException - if the given boolean array is null.
AssertionError - if the actual boolean array contains any of the given values.

isEqualTo

public BooleanArrayAssert isEqualTo(boolean[] expected)
Verifies that the actual boolean array is equal to the given array. Array equality is checked by Arrays.equals(boolean[], boolean[]).

Overrides:
isEqualTo in class GenericAssert<BooleanArrayAssert,boolean[]>
Parameters:
expected - the given array to compare the actual array to.
Returns:
this assertion object.
Throws:
AssertionError - if the actual boolean array is not equal to the given one.

isNotEqualTo

public BooleanArrayAssert isNotEqualTo(boolean[] array)
Verifies that the actual boolean array is not equal to the given array. Array equality is checked by Arrays.equals(boolean[], boolean[]).

Overrides:
isNotEqualTo in class GenericAssert<BooleanArrayAssert,boolean[]>
Parameters:
array - the given array to compare the actual array to.
Returns:
this assertion object.
Throws:
AssertionError - if the actual boolean array is equal to the given one.


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