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 -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected org.springframework.http.ResponseEntity<Map>Creates an instance of the response to be used by default.performRunnableAndRespondWith(Runnable act, org.springframework.http.ResponseEntity.BodyBuilder builder) Specifies to perform an action before return the specified response from the send method.Stubs this test sender to simulate an response from the remote system.Stubs this test sender to simulate a success response from the remote system.voidsend(SyncParameters parameters) Sends item deletion to an external system.Methods inherited from class de.hybris.platform.outboundservices.util.OutboundInvocationTracker
after, getAllInvocations, internalSend, invocations, itemsFromInvocationsTo, itemsFromInvocationsTo, keysFromInvocationsTo, performRunnableAndRespondWith, respondWith, respondWith, respondWith, throwExceptionMethods inherited from class org.junit.rules.ExternalResource
apply, before
-
Constructor Details
-
TestDeleteRequestSender
public TestDeleteRequestSender()
-
-
Method Details
-
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.
-
respondWithSuccess
Stubs this test sender to simulate a success response from the remote system.- Returns:
- a sender with the success response stubbed
-
respondWithError
Stubs this test sender to simulate an response from the remote system.- Returns:
- a sender with the error response stubbed
-
performRunnableAndRespondWith
public TestDeleteRequestSender performRunnableAndRespondWith(Runnable act, org.springframework.http.ResponseEntity.BodyBuilder builder) Description copied from class:OutboundInvocationTrackerSpecifies to perform an action before return the specified response from the send method.- Overrides:
performRunnableAndRespondWithin classOutboundInvocationTracker<TestDeleteRequestSender>- Parameters:
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.builder- a response builder to use to create the response after performing the actionact.- Returns:
- a tracker with the response specified.
-
send
Description copied from interface:DeleteRequestSenderSends item deletion to an external system.- Specified by:
sendin interfaceDeleteRequestSender- Parameters:
parameters- parameters for the change notification.
-