use of name.abuchen.portfolio.model.Bookmark in project portfolio by buchen.
the class BookmarkTest method testDuplicateKeyReplacement.
@Test
public void testDuplicateKeyReplacement() {
Bookmark page = new Bookmark("", "https://www.flatex.de/suche/?q={isin}&isin={isin}");
Security security = new Security("Daimler", "DE0007100000", "", YahooFinanceQuoteFeed.ID);
security.setWkn("12345");
assertThat(page.constructURL(new Client(), security), equalTo("https://www.flatex.de/suche/?q=DE0007100000&isin=DE0007100000"));
}
use of name.abuchen.portfolio.model.Bookmark in project portfolio by buchen.
the class BookmarkTest method testSuffixIsAppended.
@Test
public void testSuffixIsAppended() {
Bookmark page = new Bookmark("", "https://www.flatex.de/suche/?q={wkn}&isin={isin}XXX");
Security security = new Security("Daimler", "DE0007100000", "", YahooFinanceQuoteFeed.ID);
security.setWkn("12345");
assertThat(page.constructURL(new Client(), security), equalTo("https://www.flatex.de/suche/?q=12345&isin=DE0007100000XXX"));
}
use of name.abuchen.portfolio.model.Bookmark in project portfolio by buchen.
the class BookmarkTest method testCustomAttributes.
@Test
public void testCustomAttributes() {
AttributeType attribute = new AttributeType(UUID.randomUUID().toString());
attribute.setType(String.class);
attribute.setName("CUSIP Number");
attribute.setColumnLabel("CUSIP");
attribute.setConverter(AttributeType.StringConverter.class);
attribute.setTarget(Security.class);
Client client = new Client();
client.getSettings().addAttributeType(attribute);
Bookmark page = new Bookmark("", "https://www.flatex.de/suche/{CUSIP}");
Security security = new Security("Daimler", "DE0007100000", "DAI.DE", YahooFinanceQuoteFeed.ID);
security.getAttributes().put(attribute, "D1668R123");
assertThat(page.constructURL(client, security), equalTo("https://www.flatex.de/suche/D1668R123"));
}
Aggregations