PairTradeRoundTrip implements IRoundTrip { @Override public boolean isComplete() { return longEntry != null && longExit != null && shortEntry != null && shortExit != null; }  @Override void addTradeReference( TradeOrder order, TradeReferenceLine tradeReference ); @Override String getResults(); @Override boolean isComplete(); @Override String getCorrelationId(); @Override int hashCode(); @Override boolean equals(Object obj); @Override String toString(); static final long serialVersionUID; }
@Test public void testIsComplete() { assertFalse(roundTrip.isComplete()); roundTrip.longEntry = order; roundTrip.shortEntry = order; roundTrip.longExit = order; roundTrip.shortExit = order; assertTrue(roundTrip.isComplete()); roundTrip.longEntry = null; assertFalse(roundTrip.isComplete()); roundTrip.longEntry = order; roundTrip.shortEntry = null; assertFalse(roundTrip.isComplete()); roundTrip.shortEntry = order; roundTrip.longExit = null; assertFalse(roundTrip.isComplete()); roundTrip.longExit = order; roundTrip.shortExit = null; assertFalse(roundTrip.isComplete()); roundTrip.shortExit = order; assertTrue(roundTrip.isComplete()); }