public class AbstractSoftAssertions extends Object
Modifier and Type | Field and Description |
---|---|
protected org.assertj.core.api.SoftProxies |
proxies |
Constructor and Description |
---|
AbstractSoftAssertions() |
Modifier and Type | Method and Description |
---|---|
List<Throwable> |
errorsCollected()
Returns a copy of list of soft assertions collected errors.
|
<T,V> V |
proxy(Class<V> assertClass,
Class<T> actualClass,
T actual) |
boolean |
wasSuccess()
Returns the result of last soft assertion which can be used to decide what the next one should be.
|
public List<Throwable> errorsCollected()
public boolean wasSuccess()
Example :
Person person = ...
SoftAssertions soft = new SoftAssertions();
if (soft.assertThat(person.getAddress()).isNotNull().wasSuccess()) {
soft.assertThat(person.getAddress().getStreet()).isNotNull();
}
Copyright © 2014–2016 AssertJ. All rights reserved.