CFDTicker extends Ticker { @Override public InstrumentType getInstrumentType() { return InstrumentType.CFD; } CFDTicker(String symbol); @Override InstrumentType getInstrumentType(); static final long serialVersionUID; }
@Test public void testConstructor() { CFDTicker ticker = new CFDTicker("XYZ"); assertEquals(new BigDecimal(1), ticker.getContractMultiplier() ); assertEquals(new BigDecimal("0.01"), ticker.getMinimumTickSize()); assertEquals( Exchange.INTERACTIVE_BROKERS_SMART, ticker.getExchange()); assertEquals( InstrumentType.CFD, ticker.getInstrumentType()); assertEquals( "XYZ", ticker.getSymbol()); }