com.googlecode.catchexception.throwable.apis
Class CatchThrowableAssertJ

java.lang.Object
  extended by com.googlecode.catchexception.throwable.apis.BDDCatchThrowable
      extended by com.googlecode.catchexception.throwable.apis.CatchThrowableAssertJ

Deprecated. As of release 1.3.0, replaced by com.googlecode.catchexception.throwable.apis.BDDCatchThrowable()

@Deprecated
public class CatchThrowableAssertJ
extends BDDCatchThrowable

Supports BDD-like approach to catch and verify throwables (given/when/then).

EXAMPLE:

// given an empty list
 List myList = new ArrayList();

 // when we try to get the first element of the list
 when(myList).get(1);

 // then we expect an IndexOutOfBoundsThrowable
 then(caughtThrowable())
 .isInstanceOf(IndexOutOfBoundsThrowable.class)
 .hasMessage("Index: 1, Size: 0")
 .hasNoCause();

 // then we expect an IndexOutOfBoundsThrowable (alternatively)
 thenThrown(IndexOutOfBoundsThrowable.class);
 

Since:
1.2.0
Author:
rwoo
See Also:
Assertions.assertThat(Throwable)

Constructor Summary
CatchThrowableAssertJ()
          Deprecated.  
 
Method Summary
 
Methods inherited from class com.googlecode.catchexception.throwable.apis.BDDCatchThrowable
caughtThrowable, then, thenThrown, when
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CatchThrowableAssertJ

public CatchThrowableAssertJ()
Deprecated. 


Copyright © 2015. All rights reserved.