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
  • Constructor Details

    • TestDeleteRequestSender

      public TestDeleteRequestSender()
  • Method Details

    • createDefaultResponse

      protected org.springframework.http.ResponseEntity<Map> createDefaultResponse()
      Description copied from class: OutboundInvocationTracker
      Creates an instance of the response to be used by default.
      Specified by:
      createDefaultResponse in class OutboundInvocationTracker<TestDeleteRequestSender>
      Returns:
      a response that should be returned from the send invocations when explicit response was not specified.
    • respondWithSuccess

      public TestDeleteRequestSender respondWithSuccess()
      Stubs this test sender to simulate a success response from the remote system.
      Returns:
      a sender with the success response stubbed
    • respondWithError

      public TestDeleteRequestSender 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: OutboundInvocationTracker
      Specifies to perform an action before return the specified response from the send method.
      Overrides:
      performRunnableAndRespondWith in class OutboundInvocationTracker<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 action act.
      Returns:
      a tracker with the response specified.
    • send

      public void send(SyncParameters parameters)
      Description copied from interface: DeleteRequestSender
      Sends item deletion to an external system.
      Specified by:
      send in interface DeleteRequestSender
      Parameters:
      parameters - parameters for the change notification.