public class AvsClientMock extends SharedClientMock implements AvsClient
AvsClientPING_FAIL| Constructor and Description |
|---|
AvsClientMock() |
| Modifier and Type | Method and Description |
|---|---|
AvsResult |
verifyAddress(java.lang.String xCisClientRef,
java.lang.String tenantId,
CisAddress address)
The mock implementation is used for testing purposes.
|
createRawResponseWithStatus, doPingpublic AvsResult verifyAddress(java.lang.String xCisClientRef, java.lang.String tenantId, CisAddress address) throws AbstractCisServiceException
AvsResult with REJECT is returned:
- AddressLine1
- City
- Zipcode
- Country
If the city is set to something else than "review" and the previously mentioned fields are set, an AvsResult with Accept is returned. Otherwise, an AvsResult with the decision type CisDecision.REVIEW is returned
If AddressLine4 is set with the value of 503, a ServiceNotAvailableException is thrown. If AddressLine4 is set with the value of 502, a ServiceErrorResponseException with UnknownServiceExceptionDetail is thrown. If AddressLine4 is set with the value of 504, a ServiceTimeoutException is thrown. If AddressLine4 is set with the value of 500, a IllegalStateException is thrown.
verifyAddress in interface AvsClientaddress - the test address.xCisClientRef - client ref to pass in the headertenantId - tenantId to pass in the headerAbstractCisServiceExceptionCopyright © 2018 SAP SE. All Rights Reserved.