Package org.kie.pipeline.camel

Examples of org.kie.pipeline.camel.Person


        mockResult.assertIsSatisfied();
    }

    @Test
    public void testNoSessionInsert() throws Exception {
        Person person = new Person();
        person.setName( "Mauricio" );

        InsertObjectCommand cmd = (InsertObjectCommand) CommandFactory.newInsert( person,
                                                                                  "salaboy" );

        ExecutionResults response = (ExecutionResults) template.requestBodyAndHeader( "direct:test-no-session",
View Full Code Here


                                                       MockEndpoint.class );

        String headerName = "testHeaderName";
        String headerValue = "testHeaderValue";

        Person person = new Person();
        person.setName( "Mauricio" );

        InsertObjectCommand cmd = (InsertObjectCommand) CommandFactory.newInsert( person,
                                                                                  "salaboy" );

        Map<String, Object> headers = new HashMap<String, Object>();
View Full Code Here

        mockResult.assertIsSatisfied();
    }

    @Test
    public void testSessionBatchExecutionCommand() throws Exception {
        Person john = new Person();
        john.setName( "John Smith" );

        List<Command> commands = new ArrayList<Command>();
        commands.add( CommandFactory.newInsert( john,
                                                "john" ) );
        BatchExecutionCommand batchExecutionCommand = CommandFactory.newBatchExecution( commands );
View Full Code Here

                                                       MockEndpoint.class );

        String headerName = "testHeaderName";
        String headerValue = "testHeaderValue";

        Person john = new Person();
        john.setName( "John Smith" );

        List<Command> commands = new ArrayList<Command>();
        commands.add( CommandFactory.newInsert( john,
                                                "john" ) );
        BatchExecutionCommand batchExecutionCommand = CommandFactory.newBatchExecution( commands );
View Full Code Here

        };
    }

    @Override
    protected void configureDroolsContext(Context jndiContext) {
        Person me = new Person();
        me.setName( "Hadrian" );

        KieSession ksession = registerKnowledgeRuntime( "ksession1",
                                                        null );
        InsertObjectCommand cmd = new InsertObjectCommand( me );
        cmd.setOutIdentifier( "camel-rider" );
View Full Code Here

public class KieEndpointChannelTest extends KieCamelTestSupport {
    private KieSession ksession;

    @Test
    public void testChannelSupport() throws Exception {
        Person bob1 = new Person( "bob" );
        Person bob2 = new Person( "bob" );
        Person bob3 = new Person( "bob" );
        Person mark1 = new Person( "mark" );
       
        MockEndpoint bobs = getMockEndpoint("mock:bobs");
        bobs.expectedMessageCount(3);
        bobs.expectedBodiesReceived( bob1, bob2, bob3 );
       
View Full Code Here

    private AgendaEventListener ael;
    private RuleRuntimeEventListener wmel;

    @Test
    public void testSessionInsert() throws Exception {
        Person person = new Person();
        person.setName( "Bob" );

        template.sendBody( "direct:test-no-ep", person );
       
        ArgumentCaptor<ObjectInsertedEvent> oie = ArgumentCaptor.forClass( ObjectInsertedEvent.class );
View Full Code Here

        assertThat( (Person) oie.getValue().getObject(), is( person ) );
    }

    @Test
    public void testSessionInsertEntryPoint() throws Exception {
        Person person = new Person();
        person.setName( "Bob" );

        template.sendBody( "direct:test-with-ep", person );
       
        ArgumentCaptor<ObjectInsertedEvent> oie = ArgumentCaptor.forClass( ObjectInsertedEvent.class );
View Full Code Here

        assertThat( (Person) oie.getValue().getObject(), is( person ) );
    }

    @Test
    public void testSessionInsertMessage() throws Exception {
        Person person = new Person();
        person.setName( "Bob" );

        template.sendBody( "direct:test-message", person );
       
        ArgumentCaptor<ObjectInsertedEvent> oie = ArgumentCaptor.forClass( ObjectInsertedEvent.class );
View Full Code Here

        assertThat( (Person) ((Message) oie.getValue().getObject()).getBody(), is( person ) );
    }

    @Test
    public void testSessionInsertExchange() throws Exception {
        Person person = new Person();
        person.setName( "Bob" );

        template.sendBody( "direct:test-exchange", person );
       
        ArgumentCaptor<ObjectInsertedEvent> oie = ArgumentCaptor.forClass( ObjectInsertedEvent.class );
View Full Code Here

TOP

Related Classes of org.kie.pipeline.camel.Person

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.