public abstract class ACallContract extends Object implements ICallContract
The purpose of this is to ease the burden of concrete implementations.
To extend this in a concrete implementation is optional.
Constructor and Description |
---|
ACallContract() |
Modifier and Type | Method and Description |
---|---|
IChecker |
getAssertingChecker()
The checker with asserting check-method.
|
Object |
getCaller()
The caller that called asserting check-method and therefore must call fail-method.
|
Object[] |
getCheckArguments()
The arguments supplied the asserting check-method by the caller.
|
Object[] |
getCheckExtraArguments()
The extra arguments supplied by the asserting check-method implementation.
|
Class<? extends ICheck> |
getCheckSpecification()
The check specification (interface) with specification of asserting check-method.
|
Class<? extends IFail> |
reflectFailSpecificationType()
Reflects the fail specification (interface) that should be used to end this contract.
|
void |
setAssertingChecker(IChecker assertingChecker)
The checker with asserting check-method.
|
void |
setCaller(Object caller)
The caller that called asserting check-method and therefore must call fail-method.
|
void |
setCheckArguments(Object[] checkArguments)
The arguments supplied the asserting check-method by the caller.
|
void |
setCheckExtraArguments(Object[] checkExtraArguments)
The extra arguments supplied by the asserting check-method implementation.
|
void |
setCheckSpecification(Class<? extends ICheck> checkSpecification)
The check specification (interface) with specification of asserting check-method.
|
void |
validateContractData()
Validates the contract data e.g.
|
public Object getCaller()
ICallContract
getCaller
in interface ICallContract
public void setCaller(Object caller)
ICallContract
setCaller
in interface ICallContract
caller
- caller that called asserting check-method and therefore must call fail-methodpublic IChecker getAssertingChecker()
ICallContract
getAssertingChecker
in interface ICallContract
public void setAssertingChecker(IChecker assertingChecker)
ICallContract
setAssertingChecker
in interface ICallContract
assertingChecker
- checker with asserting check-methodpublic Class<? extends ICheck> getCheckSpecification()
ICallContract
The checkSpecification is annotated with a fail specification that needs to be called by the caller to end this contract.
getCheckSpecification
in interface ICallContract
public void setCheckSpecification(Class<? extends ICheck> checkSpecification)
ICallContract
The checkSpecification is annotated with a fail specification that needs to be called by the caller to end this contract.
setCheckSpecification
in interface ICallContract
checkSpecification
- check specification (interface) with specification of asserting check-methodpublic Object[] getCheckArguments()
ICallContract
getCheckArguments
in interface ICallContract
public void setCheckArguments(Object[] checkArguments)
ICallContract
setCheckArguments
in interface ICallContract
checkArguments
- arguments supplied the asserting check-method by the callerpublic Object[] getCheckExtraArguments()
ICallContract
getCheckExtraArguments
in interface ICallContract
public void setCheckExtraArguments(Object[] checkExtraArguments)
ICallContract
setCheckExtraArguments
in interface ICallContract
checkExtraArguments
- extra arguments supplied by the asserting check-method implementationpublic void validateContractData()
ICallContract
validateContractData
in interface ICallContract
public Class<? extends IFail> reflectFailSpecificationType()
ICallContract
reflectFailSpecificationType
in interface ICallContract
The MIT License (MIT) - Copyright © 2014-2015 Keld Oelykke. All Rights Reserved.