org.fest.assertions.core
Interface EnumerableAssert<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 Known Subinterfaces:
ObjectEnumerableAssert<S>
All Known Implementing Classes:
AbstractIterableAssert, BooleanArrayAssert, ByteArrayAssert, CharArrayAssert, DoubleArrayAssert, FloatArrayAssert, IntArrayAssert, IterableAssert, ListAssert, LongArrayAssert, MapAssert, ObjectArrayAssert, ShortArrayAssert, StringAssert

public interface EnumerableAssert<S>

Assertions applicable to groups of values that can be enumerated (e.g. arrays, collections or strings.)

Author:
Yvonne Wang, Alex Ruiz

Method Summary
 S hasSize(int expected)
          Verifies that the number of values in the actual group is equal to the given one.
 void isEmpty()
          Verifies that the actual group of values is empty.
 S isNotEmpty()
          Verifies that the actual group of values is not empty.
 void isNullOrEmpty()
          Verifies that the actual group of values is null or empty.
 

Method Detail

isNullOrEmpty

void isNullOrEmpty()
Verifies that the actual group of values is null or empty.

Throws:
AssertionError - if the actual group of values is not null or not empty.

isEmpty

void isEmpty()
Verifies that the actual group of values is empty.

Throws:
AssertionError - if the actual group of values is not empty.

isNotEmpty

S isNotEmpty()
Verifies that the actual group of values is not empty.

Returns:
this assertion object.
Throws:
AssertionError - if the actual group of values is empty.

hasSize

S hasSize(int expected)
Verifies that the number of values in the actual group is equal to the given one.

Parameters:
expected - the expected number of values in the actual group.
Returns:
this assertion object.
Throws:
AssertionError - if the number of values of the actual group is not equal to the given one.


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