Package de.hybris.platform.outboundsync
Class TestOutboundFacade
- java.lang.Object
-
- org.junit.rules.ExternalResource
-
- de.hybris.platform.outboundsync.TestOutboundFacade
-
- All Implemented Interfaces:
OutboundServiceFacade,org.junit.rules.TestRule
public class TestOutboundFacade extends org.junit.rules.ExternalResource implements OutboundServiceFacade
-
-
Constructor Summary
Constructors Constructor Description TestOutboundFacade()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidafter()intinvocations()<T extends org.springframework.http.ResponseEntity.HeadersBuilder>
TestOutboundFacaderespondWith(T... builders)static TestOutboundFacaderespondWithCreated()Creates new instance of this test facade, which will respond with HTTP 201 Created to all requests it receives.static TestOutboundFacaderespondWithNotFound()Creates new instance of this test facade, which will respond with HTTP 404 Not Found to all requests it receives.rx.Observable<org.springframework.http.ResponseEntity<java.util.Map>>send(ItemModel itemModel, java.lang.String integrationObjectCode, java.lang.String destination)Method orchestrates the services to build the payload and to integrate with restful endpoint.
-
-
-
Method Detail
-
respondWithCreated
public static TestOutboundFacade respondWithCreated()
Creates new instance of this test facade, which will respond with HTTP 201 Created to all requests it receives.- Returns:
- new test facade instance.
-
respondWithNotFound
public static TestOutboundFacade respondWithNotFound()
Creates new instance of this test facade, which will respond with HTTP 404 Not Found to all requests it receives.- Returns:
- new test facade instance.
-
respondWith
@SafeVarargs public final <T extends org.springframework.http.ResponseEntity.HeadersBuilder> TestOutboundFacade respondWith(T... builders)
-
send
public rx.Observable<org.springframework.http.ResponseEntity<java.util.Map>> send(ItemModel itemModel, java.lang.String integrationObjectCode, java.lang.String destination)
Description copied from interface:OutboundServiceFacadeMethod orchestrates the services to build the payload and to integrate with restful endpoint.- Specified by:
sendin interfaceOutboundServiceFacade- Parameters:
itemModel- the model to be convertedintegrationObjectCode- the name of the integration object to convert this model as payloaddestination- endpoint destination information- Returns:
- rx.Observable which allows the caller to subscribe the callback method
-
invocations
public int invocations()
-
after
protected void after()
- Overrides:
afterin classorg.junit.rules.ExternalResource
-
-