Class TestDeleteRequestSender
- java.lang.Object
-
- org.junit.rules.ExternalResource
-
- de.hybris.platform.outboundservices.util.OutboundInvocationTracker<TestDeleteRequestSender>
-
- de.hybris.platform.outboundservices.util.TestDeleteRequestSender
-
- All Implemented Interfaces:
DeleteRequestSender,org.junit.rules.TestRule
public class TestDeleteRequestSender extends OutboundInvocationTracker<TestDeleteRequestSender> implements DeleteRequestSender
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class de.hybris.platform.outboundservices.util.OutboundInvocationTracker
OutboundInvocationTracker.EntityResponse<R>, OutboundInvocationTracker.ExceptionResponse, OutboundInvocationTracker.Invocation
-
-
Field Summary
-
Fields inherited from class de.hybris.platform.outboundservices.util.OutboundInvocationTracker
invocations
-
-
Constructor Summary
Constructors Constructor Description TestDeleteRequestSender()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected org.springframework.http.ResponseEntity<java.util.Map>createDefaultResponse()Creates an instance of the response to be used by default.TestDeleteRequestSenderdoAndRespondWith(org.springframework.http.ResponseEntity.BodyBuilder builder, java.lang.Runnable act)Specifies to perform an action before return the specified response from the send method.voidsend(SyncParameters parameters)Sends item deletion to an external system.TestDeleteRequestSenderthrowException(java.lang.RuntimeException e)Specifies to throw an exception when the send method is called.-
Methods inherited from class de.hybris.platform.outboundservices.util.OutboundInvocationTracker
after, doAndRespondWith, internalSend, invocations, itemsFromInvocationsTo, itemsFromInvocationsTo, keysFromInvocationsTo, respondWith, respondWith
-
-
-
-
Method Detail
-
createDefaultResponse
protected org.springframework.http.ResponseEntity<java.util.Map> createDefaultResponse()
Description copied from class:OutboundInvocationTrackerCreates an instance of the response to be used by default.- Specified by:
createDefaultResponsein classOutboundInvocationTracker<TestDeleteRequestSender>- Returns:
- a response that should be returned from the send invocations when explicit response was not specified.
-
throwException
public TestDeleteRequestSender throwException(java.lang.RuntimeException e)
Description copied from class:OutboundInvocationTrackerSpecifies to throw an exception when the send method is called.- Overrides:
throwExceptionin classOutboundInvocationTracker<TestDeleteRequestSender>- Parameters:
e- an exception to throw- Returns:
- tracker with the behavior applied
-
doAndRespondWith
public TestDeleteRequestSender doAndRespondWith(org.springframework.http.ResponseEntity.BodyBuilder builder, java.lang.Runnable act)
Description copied from class:OutboundInvocationTrackerSpecifies to perform an action before return the specified response from the send method.- Overrides:
doAndRespondWithin classOutboundInvocationTracker<TestDeleteRequestSender>- Parameters:
builder- a response builder to use to create the response after performing the actionact.act- an action to perform before the response is returned. This allows to inject time-sensitive behavior to the test to call certain code when a desired item is being processed instead of relying on guessing the right time to execute that code in parallel.- Returns:
- a tracker with the response specified.
-
send
public void send(SyncParameters parameters)
Description copied from interface:DeleteRequestSenderSends item deletion to an external system.- Specified by:
sendin interfaceDeleteRequestSender- Parameters:
parameters- parameters for the change notification.
-
-