|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.assertj.core.api.Assertions org.assertj.core.api.BDDAssertions
public class BDDAssertions
BDD style entry point for assertion methods for different data types. Each method in this class is a static factory for the type-specific assertion objects. The purpose of this class is to make test code more readable.
The difference with Assertions class is that entry point methods are named then
instead of
assertThat
.
For example:
@Test public void bdd_assertions_examples() { //given List<BasketBallPlayer> bulls = new ArrayList<BasketBallPlayer>(); //when bulls.add(rose); bulls.add(noah); then(bulls).contains(rose, noah).doesNotContain(james); }
Constructor Summary | |
---|---|
protected |
BDDAssertions()
Creates a new BDDAssertions . |
Method Summary | ||
---|---|---|
static AbstractBigDecimalAssert<?> |
then(BigDecimal actual)
Creates a new instance of . |
|
static AbstractBooleanAssert<?> |
then(boolean actual)
Creates a new instance of . |
|
static AbstractBooleanAssert<?> |
then(Boolean actual)
Creates a new instance of . |
|
static AbstractBooleanArrayAssert<?> |
then(boolean[] actual)
Creates a new instance of . |
|
static AbstractByteAssert<?> |
then(byte actual)
Creates a new instance of . |
|
static AbstractByteAssert<?> |
then(Byte actual)
Creates a new instance of . |
|
static AbstractByteArrayAssert<?> |
then(byte[] actual)
Creates a new instance of . |
|
static AbstractCharacterAssert<?> |
then(char actual)
Creates a new instance of . |
|
static AbstractCharArrayAssert<?> |
then(char[] actual)
Creates a new instance of . |
|
static AbstractCharacterAssert<?> |
then(Character actual)
Creates a new instance of . |
|
static AbstractCharSequenceAssert<?,? extends CharSequence> |
then(CharSequence actual)
Creates a new instance of . |
|
static AbstractClassAssert<?> |
then(Class<?> actual)
Creates a new instance of
|
|
static AbstractDateAssert<?> |
then(Date actual)
Creates a new instance of . |
|
static AbstractDoubleAssert<?> |
then(double actual)
Creates a new instance of . |
|
static AbstractDoubleAssert<?> |
then(Double actual)
Creates a new instance of . |
|
static AbstractDoubleArrayAssert<?> |
then(double[] actual)
Creates a new instance of . |
|
static AbstractFileAssert<?> |
then(File actual)
Creates a new instance of . |
|
static AbstractFloatAssert<?> |
then(float actual)
Creates a new instance of . |
|
static AbstractFloatAssert<?> |
then(Float actual)
Creates a new instance of . |
|
static AbstractFloatArrayAssert<?> |
then(float[] actual)
Creates a new instance of . |
|
static AbstractInputStreamAssert<?,? extends InputStream> |
then(InputStream actual)
Creates a new instance of . |
|
static AbstractIntegerAssert<?> |
then(int actual)
Creates a new instance of . |
|
static AbstractIntArrayAssert<?> |
then(int[] actual)
Creates a new instance of . |
|
static AbstractIntegerAssert<?> |
then(Integer actual)
Creates a new instance of . |
|
static
|
then(Iterable<? extends T> actual)
Creates a new instance of . |
|
static
|
then(Iterator<? extends T> actual)
Creates a new instance of . |
|
static
|
then(List<? extends T> actual)
Creates a new instance of . |
|
static AbstractLongAssert<?> |
then(long actual)
Creates a new instance of . |
|
static AbstractLongAssert<?> |
then(Long actual)
Creates a new instance of . |
|
static AbstractLongArrayAssert<?> |
then(long[] actual)
Creates a new instance of . |
|
static
|
then(Map<K,V> actual)
Creates a new instance of . |
|
static AbstractShortAssert<?> |
then(short actual)
Creates a new instance of . |
|
static AbstractShortAssert<?> |
then(Short actual)
Creates a new instance of . |
|
static AbstractShortArrayAssert<?> |
then(short[] actual)
Creates a new instance of . |
|
static AbstractCharSequenceAssert<?,String> |
then(String actual)
Creates a new instance of . |
|
static
|
then(T actual)
Creates a new instance of . |
|
static
|
then(T[] actual)
Creates a new instance of . |
|
static AbstractThrowableAssert<?,? extends Throwable> |
then(Throwable actual)
Creates a new instance of . |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected BDDAssertions()
BDDAssertions
.
Method Detail |
---|
public static AbstractBigDecimalAssert<?> then(BigDecimal actual)
BigDecimalAssert
.
actual
- the actual value.
public static AbstractBooleanAssert<?> then(boolean actual)
BooleanAssert
.
actual
- the actual value.
public static AbstractBooleanAssert<?> then(Boolean actual)
BooleanAssert
.
actual
- the actual value.
public static AbstractBooleanArrayAssert<?> then(boolean[] actual)
BooleanArrayAssert
.
actual
- the actual value.
public static AbstractByteAssert<?> then(byte actual)
ByteAssert
.
actual
- the actual value.
public static AbstractByteAssert<?> then(Byte actual)
ByteAssert
.
actual
- the actual value.
public static AbstractByteArrayAssert<?> then(byte[] actual)
ByteArrayAssert
.
actual
- the actual value.
public static AbstractCharacterAssert<?> then(char actual)
CharacterAssert
.
actual
- the actual value.
public static AbstractCharArrayAssert<?> then(char[] actual)
CharArrayAssert
.
actual
- the actual value.
public static AbstractCharacterAssert<?> then(Character actual)
CharacterAssert
.
actual
- the actual value.
public static AbstractClassAssert<?> then(Class<?> actual)
ClassAssert
actual
- the actual value.
public static <T> AbstractIterableAssert<?,? extends Iterable<? extends T>,T> then(Iterable<? extends T> actual)
IterableAssert
.
actual
- the actual value.
public static <T> AbstractIterableAssert<?,? extends Iterable<? extends T>,T> then(Iterator<? extends T> actual)
IterableAssert
. The Iterator
is first
converted
into an Iterable
actual
- the actual value.
public static AbstractDoubleAssert<?> then(double actual)
DoubleAssert
.
actual
- the actual value.
public static AbstractDoubleAssert<?> then(Double actual)
DoubleAssert
.
actual
- the actual value.
public static AbstractDoubleArrayAssert<?> then(double[] actual)
DoubleArrayAssert
.
actual
- the actual value.
public static AbstractFileAssert<?> then(File actual)
FileAssert
.
actual
- the actual value.
public static AbstractInputStreamAssert<?,? extends InputStream> then(InputStream actual)
InputStreamAssert
.
actual
- the actual value.
public static AbstractFloatAssert<?> then(float actual)
FloatAssert
.
actual
- the actual value.
public static AbstractFloatAssert<?> then(Float actual)
FloatAssert
.
actual
- the actual value.
public static AbstractFloatArrayAssert<?> then(float[] actual)
FloatArrayAssert
.
actual
- the actual value.
public static AbstractIntegerAssert<?> then(int actual)
IntegerAssert
.
actual
- the actual value.
public static AbstractIntArrayAssert<?> then(int[] actual)
IntArrayAssert
.
actual
- the actual value.
public static AbstractIntegerAssert<?> then(Integer actual)
IntegerAssert
.
actual
- the actual value.
public static <T> AbstractListAssert<?,? extends List<? extends T>,T> then(List<? extends T> actual)
ListAssert
.
actual
- the actual value.
public static AbstractLongAssert<?> then(long actual)
LongAssert
.
actual
- the actual value.
public static AbstractLongAssert<?> then(Long actual)
LongAssert
.
actual
- the actual value.
public static AbstractLongArrayAssert<?> then(long[] actual)
LongArrayAssert
.
actual
- the actual value.
public static <T> AbstractObjectAssert<?,T> then(T actual)
ObjectAssert
.
actual
- the actual value.
public static <T> AbstractObjectArrayAssert<?,T> then(T[] actual)
ObjectArrayAssert
.
actual
- the actual value.
public static <K,V> AbstractMapAssert<?,? extends Map<K,V>,K,V> then(Map<K,V> actual)
MapAssert
.
actual
- the actual value.
public static AbstractShortAssert<?> then(short actual)
ShortAssert
.
actual
- the actual value.
public static AbstractShortAssert<?> then(Short actual)
ShortAssert
.
actual
- the actual value.
public static AbstractShortArrayAssert<?> then(short[] actual)
ShortArrayAssert
.
actual
- the actual value.
public static AbstractCharSequenceAssert<?,? extends CharSequence> then(CharSequence actual)
CharSequenceAssert
.
actual
- the actual value.
public static AbstractCharSequenceAssert<?,String> then(String actual)
StringAssert
.
actual
- the actual value.
public static AbstractDateAssert<?> then(Date actual)
DateAssert
.
actual
- the actual value.
public static AbstractThrowableAssert<?,? extends Throwable> then(Throwable actual)
ThrowableAssert
.
actual
- the actual value.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |