4647484950515253
@Test public void processesEquities() { Deal deal = new Deal(new Equity("Deutsche Bank")); Result result = processor.process(deal); assertThat(result.getFee(), is(new BigDecimal(10.5))); }
545556575859606162
@Test(expected = UnsupportedInstrumentException.class) public void handlesUnsupportedInstrument() { Deal deal = new Deal(new UnsupportedInstrument()); Result result = processor.process(deal); assertThat(result.getFee(), is(new BigDecimal(0.0))); }
4546474849505152
606162636465666768
@Test public void vmWareEquitiesIsFree() { Deal deal = new Deal(new Equity("VMware")); Result result = processor.process(deal); assertThat(result.getFee(), is(BigDecimal.ZERO)); }