use of name.abuchen.portfolio.datatransfer.csv.CSVImporter.ISINField in project portfolio by buchen.
the class ISINFieldTest method testPartialMatch.
@Test
public void testPartialMatch() throws ParseException {
ISINField field = new ISINField(Messages.CSVColumn_ISIN);
Format format = field.createFormat(Arrays.asList(new Security("SAP", "DE0007164600", "SAP.DE", QuoteFeed.MANUAL)));
assertThat(format.parseObject("Zins/Dividende ISIN DE0007164600 SAP SE O."), is("DE0007164600"));
assertThat(format.parseObject("ISIN DE0007164600"), is("DE0007164600"));
}
use of name.abuchen.portfolio.datatransfer.csv.CSVImporter.ISINField in project portfolio by buchen.
the class ISINFieldTest method testValidAndNotExistingISIN.
@Test(expected = ParseException.class)
public void testValidAndNotExistingISIN() throws ParseException {
ISINField field = new ISINField(Messages.CSVColumn_ISIN);
Format format = field.createFormat(new ArrayList<>());
format.parseObject("DE0007164600");
}
use of name.abuchen.portfolio.datatransfer.csv.CSVImporter.ISINField in project portfolio by buchen.
the class ISINFieldTest method testValidAndExistingISIN.
@Test
public void testValidAndExistingISIN() throws ParseException {
ISINField field = new ISINField(Messages.CSVColumn_ISIN);
Format format = field.createFormat(Arrays.asList(new Security("BASF", "DE000BASF111", "BAS.DE", QuoteFeed.MANUAL)));
assertThat(format.parseObject("DE000BASF111"), is("DE000BASF111"));
}
use of name.abuchen.portfolio.datatransfer.csv.CSVImporter.ISINField in project portfolio by buchen.
the class ISINFieldTest method testNotValidISIN.
@Test(expected = ParseException.class)
public void testNotValidISIN() throws ParseException {
ISINField field = new ISINField(Messages.CSVColumn_ISIN);
Format format = field.createFormat(new ArrayList<>());
format.parseObject("not valid");
}