IBLevel1QuoteProcessor extends IBQuoteProcessor<Level1QuoteData> { @Override protected void processData(Level1QuoteData data) { if (data.getSize() > 0) { processTickSize(data); } else { processTickPrice(data); } } IBLevel1QuoteProcessor(BlockingQueue<Level1QuoteData> queue, IQuoteEngine quoteEngine);   }
@Test public void testProcessData_sizeEvent() { Level1QuoteData data = new Level1QuoteData(null, 0, 0, 0, 50); MockIBLevel1QuoteProcessor processor = buildMockQuoteProcessor(true, true); processor.processData(data); assertTrue(processor.processTickSizeCalled); assertFalse(processor.processTickPriceCalled); }
@Test public void testProcessData_priceEvent() { Level1QuoteData data = new Level1QuoteData(null, 0, 45.5, 0, 0); MockIBLevel1QuoteProcessor processor = buildMockQuoteProcessor(true, true); processor.processData(data); assertFalse(processor.processTickSizeCalled); assertTrue(processor.processTickPriceCalled); }