public interface IFailFastException
The exception has properties that can be used to identify checker, failer, call arguments and formatting rules.
Modifier and Type | Method and Description |
---|---|
Object[] |
getCheckerExtraArguments()
Extra arguments used by the checker implementation.
|
Class<?> |
getCheckerSpecificationType()
The Checker specification type with check-method that asserted.
|
Object[] |
getCheckerUserArguments()
Arguments supplied at the call of the asserting check-method.
|
Object[] |
getFailerExtraArguments()
Extra arguments used by the failer implementation.
|
Class<? extends IFail> |
getFailerSpecificationType()
The Failer specification type with fail-method that produced this
exception.
|
Object[] |
getFailerUserArguments()
Arguments supplied by at the call of the fail-method.
|
String |
getFailMessageArguments()
Comma-separated list of ids of checker-call and failer-call arguments
supplied by either user or implementation.
|
String |
getFailMessageFormat()
Exception message formatting string for thrown exception.
|
void |
setCheckerExtraArguments(Object[] checkerExtraArguments)
Set the Extra arguments used by the checker implementation.
|
void |
setCheckerSpecificationType(Class<?> checkerSpecificationType)
Set the Checker specification type with check-method that asserted.
|
void |
setCheckerUserArguments(Object[] checkerUserArguments)
Sets the arguments supplied at the call of the asserting check-method.
|
void |
setFailerExtraArguments(Object[] failerExtraArguments)
Sets the Extra arguments used by the failer implementation.
|
void |
setFailerMessageArguments(String failMessageArguments)
Sets the comma-separated list of ids of checker-call and failer-call
arguments supplied by either user or implementation.
|
void |
setFailerSpecificationType(Class<? extends IFail> failerSpecificationType)
Sets the Failer specification type with fail-method that produced this
exception.
|
void |
setFailerUserArguments(Object[] failerUserArguments)
Sets the arguments supplied at the call of the fail-method.
|
void |
setMessageFormat(String failMessageFormat)
Sets the exception message formatting string for thrown exception.
|
Class<?> getCheckerSpecificationType()
void setCheckerSpecificationType(Class<?> checkerSpecificationType)
checkerSpecificationType
- Checker specification type with check-method that asserted.Object[] getCheckerUserArguments()
void setCheckerUserArguments(Object[] checkerUserArguments)
checkerUserArguments
- the arguments supplied at the call of the asserting
check-method.Object[] getCheckerExtraArguments()
void setCheckerExtraArguments(Object[] checkerExtraArguments)
checkerExtraArguments
- Extra arguments used by the checker implementation.Class<? extends IFail> getFailerSpecificationType()
void setFailerSpecificationType(Class<? extends IFail> failerSpecificationType)
failerSpecificationType
- the Failer specification type with fail-method that produced
this exception.Object[] getFailerUserArguments()
void setFailerUserArguments(Object[] failerUserArguments)
failerUserArguments
- the arguments supplied at the call of the fail-method.Object[] getFailerExtraArguments()
void setFailerExtraArguments(Object[] failerExtraArguments)
failerExtraArguments
- Extra arguments used by the failer implementation.String getFailMessageFormat()
failMessageArguments is used to produce an Object[] with this.
An example could be "%s: %s(%s) and %s(%s) are NOT equals".
void setMessageFormat(String failMessageFormat)
failMessageFormat
- the exception message formatting string for thrown exceptionString getFailMessageArguments()
This list determines the order and content of an Object[] used with failMessageFormat.
Checker-call argument ids are cu0, cu1, cu2, ... e.g. cu0 being caller, cu1 being referenceA
Failer-call argument ids are fu0, fu1, fu2, ... e.g. fu0 being caller, fu1 being "referenceA"
An example could be "cu0,fu1,cu1,fu2,cu2" to map caller and 2 arguments (both name and value) to failMessageFormat
Checker-implementation argument ids are cx0, cx1, cx2, ... e.g. cx0 being default value used in checker
Failer-implementation argument ids are fx0, fx1, cx2, ... e.g. fx0 being current time supplied by failer
void setFailerMessageArguments(String failMessageArguments)
failMessageArguments
- comma-separated list of ids of checker-call and failer-call
arguments supplied by either user or implementation.The MIT License (MIT) - Copyright © 2014-2015 Keld Oelykke. All Rights Reserved.