Package quickfix

Examples of quickfix.SessionID


    }

    @Test
    @Ignore("The session events may arrive out of order, so the test code must be refactored to cater for that - in doLogonEventsTest")
    public void sessionEvents() throws Exception {
        SessionID acceptorSessionID = new SessionID(FixVersions.BEGINSTRING_FIX42, "MARKET", "TRADER");
        SessionID initiatorSessionID = new SessionID(FixVersions.BEGINSTRING_FIX42, "TRADER", "MARKET");

        quickfixjEngine = new QuickfixjEngine("quickfix:test", "examples/inprocess.cfg", false);

        doLogonEventsTest(acceptorSessionID, initiatorSessionID, quickfixjEngine);
View Full Code Here


    @Test
    public void processInOutExchangeSuccess() throws Exception {
        Mockito.when(mockExchange.copy()).thenReturn(mockExchange);
        Mockito.when(mockExchange.getPattern()).thenReturn(ExchangePattern.InOut);
        SessionID responseSessionID = new SessionID(sessionID.getBeginString(), sessionID.getTargetCompID(), sessionID.getSenderCompID());
        Mockito.when(mockExchange.getProperty(QuickfixjProducer.CORRELATION_CRITERIA_KEY)).thenReturn(
            new MessagePredicate(responseSessionID, MsgType.EMAIL));
        Mockito.when(mockExchange.getProperty(
            QuickfixjProducer.CORRELATION_TIMEOUT_KEY,
            1000L, Long.class)).thenReturn(5000L);
View Full Code Here

       
        return factory.create(sessionID, settings);
    }
   
    public static QuickfixjEngine createEngine() throws ConfigError, FieldConvertError, IOException, JMException {      
        SessionID sessionID = new SessionID("FIX.4.4:SENDER->TARGET");

        MessageStoreFactory mockMessageStoreFactory = Mockito.mock(MessageStoreFactory.class);
        MessageStore mockMessageStore = Mockito.mock(MessageStore.class);
        Mockito.when(mockMessageStore.getCreationTime()).thenReturn(new Date());
        Mockito.when(mockMessageStoreFactory.create(sessionID)).thenReturn(mockMessageStore);
View Full Code Here

        session1Settings.put("value1", 10);
        session1Settings.put("value3", 30);

        Map<SessionID, Map<Object, Object>> sessionSettings = new HashMap<SessionID, Map<Object, Object>>();

        SessionID sessionID = new SessionID("FIX.4.2:SENDER->TARGET");
        sessionSettings.put(sessionID, session1Settings);

        factory.setSessionSettings(sessionSettings);

        SessionSettings settings = factory.createSessionSettings();
View Full Code Here

    @Test
    public void convertSessionID() {
        Object value = camelContext.getTypeConverter().convertTo(SessionID.class, "FIX.4.0:FOO->BAR");
       
        assertThat(value, instanceOf(SessionID.class));
        assertThat((SessionID)value, is(new SessionID("FIX.4.0", "FOO", "BAR")));
    }
View Full Code Here

    }

    @SuppressWarnings("deprecation")
    @Test
    public void convertToExchange() {
        SessionID sessionID = new SessionID("FIX.4.0", "FOO", "BAR");
        QuickfixjEndpoint endpoint = new QuickfixjEndpoint(null, "", camelContext);
       
        Message message = new Message();    
        message.getHeader().setString(MsgType.FIELD, MsgType.ORDER_SINGLE);
       
View Full Code Here

    }

    @SuppressWarnings("deprecation")
    @Test
    public void convertToExchangeWithNullMessage() {
        SessionID sessionID = new SessionID("FIX.4.0", "FOO", "BAR");
        QuickfixjEndpoint endpoint = new QuickfixjEndpoint(null, "", camelContext);
       
        Exchange exchange = QuickfixjConverters.toExchange(endpoint, sessionID, null, QuickfixjEventCategory.AppMessageSent);
       
        assertThat((SessionID)exchange.getIn().getHeader(QuickfixjEndpoint.SESSION_ID_KEY), is(sessionID));
View Full Code Here

        assertThat(value, instanceOf(Message.class));
    }

    @Test
    public void convertMessageWithRepeatingGroupsUsingSessionID() throws Exception {
        SessionID sessionID = new SessionID("FIX.4.4", "FOO", "BAR");
       
        createSession(sessionID);
       
        try {
            String data = "8=FIX.4.4\0019=40\00135=A\001"
View Full Code Here

        }
    }

    @Test
    public void convertMessageWithRepeatingGroupsUsingExchangeDictionary() throws Exception {
        SessionID sessionID = new SessionID("FIX.4.4", "FOO", "BAR");
       
        createSession(sessionID);
       
        try {
            String data = "8=FIX.4.4\0019=40\00135=A\001"
View Full Code Here

        }
    }

    @Test
    public void convertMessageWithRepeatingGroupsUsingExchangeDictionaryResource() throws Exception {
        SessionID sessionID = new SessionID("FIX.4.4", "FOO", "BAR");
       
        createSession(sessionID);
       
        try {
            String data = "8=FIX.4.4\0019=40\00135=A\001"
View Full Code Here

TOP

Related Classes of quickfix.SessionID

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.