public class ErrorCollector extends Object
Modifier and Type | Field and Description |
---|---|
static String |
FIELD_NAME |
Constructor and Description |
---|
ErrorCollector() |
Modifier and Type | Method and Description |
---|---|
void |
addError(Throwable error) |
protected static void |
collectAssertionError(AssertionError error,
ErrorCollector errorCollector) |
List<Throwable> |
errors() |
static Object |
intercept(ErrorCollector errorCollector,
Object assertion,
Callable<?> proxy,
Method method,
Object stub) |
boolean |
wasSuccess() |
public static final String FIELD_NAME
@RuntimeType public static Object intercept(@FieldValue(value="errorCollector") ErrorCollector errorCollector, @This Object assertion, @SuperCall Callable<?> proxy, @SuperMethod(nullIfImpossible=true) Method method, @StubValue Object stub) throws Exception
errorCollector
- the ErrorCollector
to gather assertions error for the assertion instanceassertion
- The instance of the method, the this reference.proxy
- A proxy to invoke the original method.method
- A reference to the original method.stub
- A default value for the return type. null for reference type and 0 for the corresponding primitive types.Exception
- may be thrown from the assertion proxy callprotected static void collectAssertionError(AssertionError error, ErrorCollector errorCollector)
public void addError(Throwable error)
public boolean wasSuccess()
Copyright © 2014–2019 AssertJ. All rights reserved.