public interface ICallContractor
This contractor is to make a sure a check-call that asserts is followed up by a matching fail-call.
Implementations of this should be extensible (not final).
Modifier and Type | Method and Description |
---|---|
AbstractMap.SimpleEntry<Object[],Object[]> |
popContractWithCaller(Object caller,
IFailer throwingFailer,
Class<? extends IFail> failSpecification)
Ends a contract between caller and call contractor.
|
void |
pushContractWithCaller(Object caller,
IChecker assertingChecker,
Class<? extends ICheck> checkSpecification,
Object[] checkArguments,
Object[] checkExtraArguments)
Starts a contract between caller and call contractor.
|
void pushContractWithCaller(Object caller, IChecker assertingChecker, Class<? extends ICheck> checkSpecification, Object[] checkArguments, Object[] checkExtraArguments)
Argument checkSpecification is annotated with a matching fail specification that needs to be employed by the caller to end the contract.
caller
- instance that called a checker and needs to call a failerassertingChecker
- checker that was called and assertedcheckSpecification
- check specification type inheriting ICheckcheckArguments
- user supplied check arguments for failer outputcheckExtraArguments
- implementation supplied check arguments for failer outputAbstractMap.SimpleEntry<Object[],Object[]> popContractWithCaller(Object caller, IFailer throwingFailer, Class<? extends IFail> failSpecification)
Argument failSpecification is annotated with a matching check specification that was employed by the caller to start the contract.
caller
- instance that called a checker and needs to call a failerthrowingFailer
- failer that was called to throw an exceptionfailSpecification
- fail specification type inhering by IFailThe MIT License (MIT) - Copyright © 2014-2015 Keld Oelykke. All Rights Reserved.