Package whitewerx.com.trapos.disruptor

Examples of whitewerx.com.trapos.disruptor.MarketEvent


    @Test
    public void consumesTradeEvent() throws Exception {
       
        final String delimitedTrade = "T|S|2.3m|R|GBPUSD|1.6324";
        final TradeTranslator tradeTranslator = context.mock(TradeTranslator.class);
        final MarketEvent marketEvent = context.mock(MarketEvent.class);
        final Trade trade = context.mock(Trade.class);
       
        final MarketTradeEventHandler h = new MarketTradeEventHandler(tradeTranslator);
        context.checking(new Expectations(){{
            oneOf(marketEvent).getMessage();
View Full Code Here


    @Test
    public void shouldNotConsumeRateEvents() throws Exception {
        final String delimitedRate = "R|GBPUSD|1.6324";
       
        final TradeTranslator tradeTranslator = context.mock(TradeTranslator.class);
        final MarketEvent marketEvent = context.mock(MarketEvent.class);
       
        final MarketTradeEventHandler h = new MarketTradeEventHandler(tradeTranslator);
        context.checking(new Expectations(){{
            oneOf(marketEvent).getMessage();
            will(returnValue(delimitedRate));
View Full Code Here

    @Test
    public void consumesRateEvent() throws Exception {
       
        final String delimitedRate = "R|GBPUSD|1.6324";
        final RateTranslator rateTranslator = context.mock(RateTranslator.class);
        final MarketEvent marketEvent = context.mock(MarketEvent.class);
        final Rate rate = context.mock(Rate.class);
       
        final MarketRateEventHandler h = new MarketRateEventHandler(rateTranslator);
        context.checking(new Expectations(){{
            oneOf(marketEvent).getMessage();
View Full Code Here

    @Test
    public void shouldNotConsumeTradeEvents() throws Exception {
        final String delimitedTrade = "T|S|2.3m|R|GBPUSD|1.6324";
       
        final RateTranslator rateTranslator = context.mock(RateTranslator.class);
        final MarketEvent marketEvent = context.mock(MarketEvent.class);
       
        final MarketRateEventHandler h = new MarketRateEventHandler(rateTranslator);
        context.checking(new Expectations(){{
            oneOf(marketEvent).getMessage();
            will(returnValue(delimitedTrade));
View Full Code Here

TOP

Related Classes of whitewerx.com.trapos.disruptor.MarketEvent

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.