Package org.jboss.internal.soa.esb.couriers

Examples of org.jboss.internal.soa.esb.couriers.MockCourier


    public void authenticationRequestPropagation()
        throws Exception
    {
        final String category = "test" ;
        final String service = "authenticationRequestPropagation" ;
        final MockCourier mockCourier = new PropagationMockCourier() ;
        MockRegistry.register(category, service, mockCourier) ;
       
        final ServiceInvoker si = new ServiceInvoker(category, service) ;
        final Message message = MessageFactory.getInstance().getMessage() ;
       
        assertNull("authenticationRequest", AuthenticationRequestImpl.getEncryptedAuthRequest()) ;
        assertNull("message context", message.getContext().getContext(SecurityService.AUTH_REQUEST)) ;
       
        final byte[] authenticationRequest = new byte[0] ;
        AuthenticationRequestImpl.setEncryptedAuthRequest(authenticationRequest) ;
       
        assertNotNull("authenticationRequest", AuthenticationRequestImpl.getEncryptedAuthRequest()) ;
       
        si.deliverAsync(message) ;
       
        assertNotSame("messages", message, mockCourier.message) ;
        assertNull("message context", message.getContext().getContext(SecurityService.AUTH_REQUEST)) ;
        assertNotNull("delivered message context", mockCourier.message.getContext().getContext(SecurityService.AUTH_REQUEST)) ;
        assertNotNull("authenticationRequest", AuthenticationRequestImpl.getEncryptedAuthRequest()) ;
       
        mockCourier.reset();
        si.deliverAsync(message) ;
       
        assertNotSame("messages", message, mockCourier.message) ;
        assertNull("message context", message.getContext().getContext(SecurityService.AUTH_REQUEST)) ;
        assertNotNull("delivered message context", mockCourier.message.getContext().getContext(SecurityService.AUTH_REQUEST)) ;
View Full Code Here


        MockRegistry.install();

        epr1 = new EPR(new URI("test1"));
        epr2 = new EPR(new URI("test2"));
        epr3 = new EPR(new URI("DLS"));
        courier1 = new MockCourier(true);
        courier2 = new MockCourier(true);
        courier3 = new MockCourier(true);

        MockRegistry.register("test", "java", epr1, courier1);
        MockRegistry.register("test", "xml", epr2, courier2);
        MockRegistry.register("test", "aggregator", epr3, courier3);
View Full Code Here

    public void setup() throws Exception
    {
        MockCourierFactory.install();
        MockRegistry.install();
        epr1 = new EPR(new URI("test1"));
        courier1 = new MockCourier(true);
        MockRegistry.register(MOCK_CATEGORY, MOCK_SERVICE, epr1, courier1);
       
        logger.info("Setting up jBPM");
        JbpmConfiguration jbpmConfiguration = JbpmConfiguration.getInstance();
        JbpmContext jbpmContext = jbpmConfiguration.createJbpmContext();
View Full Code Here

    public static void setup() throws Exception
    {
        MockCourierFactory.install();
        MockRegistry.install();
        EPR epr1 = new EPR(new URI("test1"));
        MockCourier courier1 = new MockCourier(true);
        MockRegistry.register("MockCategory", "MockService", epr1, courier1);
    }
View Full Code Here

TOP

Related Classes of org.jboss.internal.soa.esb.couriers.MockCourier

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.