Package org.encuestame.social.api.support

Examples of org.encuestame.social.api.support.BuzzProfile$Email


            1000L, Long.class)).thenReturn(5000L);
               
        org.apache.camel.Message mockOutboundCamelMessage = Mockito.mock(org.apache.camel.Message.class);
        Mockito.when(mockExchange.getOut()).thenReturn(mockOutboundCamelMessage);
               
        final Message outboundFixMessage = new Email();
        outboundFixMessage.getHeader().setString(SenderCompID.FIELD, "TARGET");
        outboundFixMessage.getHeader().setString(TargetCompID.FIELD, "SENDER");
       
        Session mockSession = Mockito.spy(TestSupport.createSession(sessionID));
        Mockito.doReturn(mockSession).when(producer).getSession(MessageUtils.getSessionID(inboundFixMessage));
        Mockito.doAnswer(new Answer<Boolean>() {
            @Override
View Full Code Here


        sessionSettings.setString(sessionID, SessionSettings.SENDERCOMPID, sessionID.getSenderCompID());
        sessionSettings.setString(sessionID, SessionSettings.TARGETCOMPID, sessionID.getTargetCompID());
    }

    public static Email createEmailMessage(String subject) {
        Email email = new Email(new EmailThreadID("ID"), new EmailType(EmailType.NEW), new Subject(subject));
        Email.LinesOfText text = new Email.LinesOfText();
        text.set(new Text("Content"));
        email.addGroup(text);
        return email;
    }
View Full Code Here

       
        String gatewayUri = "quickfix:examples/gateway.cfg?sessionID=FIX.4.2:TRADER@1->GATEWAY";
        Endpoint gatewayEndpoint = context.getEndpoint(gatewayUri);
        Producer producer = gatewayEndpoint.createProducer();
       
        Email email = TestSupport.createEmailMessage("Dynamic Routing Example");
        email.getHeader().setString(DeliverToCompID.FIELD, "TRADER@2");
       
        LOG.info("Sending routed message");
       
        Exchange exchange = producer.createExchange(ExchangePattern.InOnly);
        exchange.getIn().setBody(email);
View Full Code Here

        }
       
        String marketUri = "quickfix:examples/inprocess.cfg?sessionID=FIX.4.2:TRADER->MARKET";
        Producer producer = context.getEndpoint(marketUri).createProducer();
       
        Email email = TestSupport.createEmailMessage("Example");
        Exchange exchange = producer.createExchange(ExchangePattern.InOnly);
        exchange.getIn().setBody(email);
        producer.process(exchange);           

        if (!receivedMessageLatch.await(5L, TimeUnit.SECONDS)) {
View Full Code Here

       
        String gatewayUri = "quickfix:examples/gateway.cfg?sessionID=FIX.4.2:TRADER@1->GATEWAY";
        Endpoint gatewayEndpoint = context.getEndpoint(gatewayUri);
        Producer producer = gatewayEndpoint.createProducer();
       
        Email email = TestSupport.createEmailMessage("Dynamic Routing Example");
        email.getHeader().setString(DeliverToCompID.FIELD, "TRADER@2");
       
        LOG.info("Sending routed message");
       
        Exchange exchange = producer.createExchange(ExchangePattern.InOnly);
        exchange.getIn().setBody(email);
View Full Code Here

                }
            }
        };

        quickfixjEngine.addEventListener(messageListener);
        Email email = TestSupport.createEmailMessage("Test");
        Session.sendToTarget(email, initiatorSessionID);

        assertTrue("Application message not received", messageLatch.await(5000, TimeUnit.MILLISECONDS));
        quickfixjEngine.removeEventListener(messageListener);
View Full Code Here

            1000L, Long.class)).thenReturn(5000L);
               
        org.apache.camel.Message mockOutboundCamelMessage = Mockito.mock(org.apache.camel.Message.class);
        Mockito.when(mockExchange.getOut()).thenReturn(mockOutboundCamelMessage);
       
        final Message outboundFixMessage = new Email();
        outboundFixMessage.getHeader().setString(SenderCompID.FIELD, "TARGET");
        outboundFixMessage.getHeader().setString(TargetCompID.FIELD, "SENDER");
       
        Session mockSession = Mockito.spy(TestSupport.createSession(sessionID));
        Mockito.doReturn(mockSession).when(producer).getSession(MessageUtils.getSessionID(inboundFixMessage));
        Mockito.doAnswer(new Answer<Boolean>() {
            @Override
View Full Code Here

            1000L, Long.class)).thenReturn(5000L);
               
        org.apache.camel.Message mockOutboundCamelMessage = Mockito.mock(org.apache.camel.Message.class);
        Mockito.when(mockExchange.getOut()).thenReturn(mockOutboundCamelMessage);
               
        final Message outboundFixMessage = new Email();
        outboundFixMessage.getHeader().setString(SenderCompID.FIELD, "TARGET");
        outboundFixMessage.getHeader().setString(TargetCompID.FIELD, "SENDER");
       
        Session mockSession = Mockito.spy(TestSupport.createSession(sessionID));
        Mockito.doReturn(mockSession).when(producer).getSession(MessageUtils.getSessionID(inboundFixMessage));
        Mockito.doAnswer(new Answer<Boolean>() {
            @Override
View Full Code Here

                }
            }
        };

        quickfixjEngine.addEventListener(messageListener);
        Email email = TestSupport.createEmailMessage("Test");
        Session.sendToTarget(email, initiatorSessionID);

        assertTrue("Application message not received", messageLatch.await(5000, TimeUnit.MILLISECONDS));
        quickfixjEngine.removeEventListener(messageListener);
View Full Code Here

            1000L, Long.class)).thenReturn(5000L);
               
        org.apache.camel.Message mockOutboundCamelMessage = Mockito.mock(org.apache.camel.Message.class);
        Mockito.when(mockExchange.getOut()).thenReturn(mockOutboundCamelMessage);
       
        final Message outboundFixMessage = new Email();
        outboundFixMessage.getHeader().setString(SenderCompID.FIELD, "TARGET");
        outboundFixMessage.getHeader().setString(TargetCompID.FIELD, "SENDER");
       
        Session mockSession = Mockito.spy(TestSupport.createSession(sessionID));
        Mockito.doReturn(mockSession).when(producer).getSession(MessageUtils.getSessionID(inboundFixMessage));
        Mockito.doAnswer(new Answer<Boolean>() {
            @Override
View Full Code Here

TOP

Related Classes of org.encuestame.social.api.support.BuzzProfile$Email

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.