public void parseLineTooShort() {
assertNull(CSVPositionSource.parseLine(new String[] {"foo", "bar"}, UID));
}
public void parseLineOneIdentifier() {
Position position = CSVPositionSource.parseLine(new String[] {"98.4", "KIRK", "MY-ID"}, UID);
assertNotNull(position);
assertEquals(UID, position.getUniqueId());
assertNotNull(position.getQuantity());
assertEquals(0, new BigDecimal(984).scaleByPowerOfTen(-1).compareTo(position.getQuantity()));
assertEquals(1, position.getSecurityLink().getExternalId().size());
ExternalId id = position.getSecurityLink().getExternalId().iterator().next();
assertNotNull(id);
assertNotNull(id.getScheme());
assertEquals("KIRK", id.getScheme().getName());
assertNotNull(id.getValue());
assertEquals("MY-ID", id.getValue());