Search in sources :

Example 1 with CardImageUrls

use of org.mage.plugins.card.dl.sources.CardImageUrls in project mage by magefree.

the class TokensMtgImageSourceTest method generateTokenUrlTest.

@Test
public void generateTokenUrlTest() throws Exception {
    CardImageSource imageSource = TokensMtgImageSource.instance;
    CardImageUrls url = imageSource.generateTokenUrl(new CardDownloadData("Thopter", "ORI", "0", false, 1, "ORI", ""));
    Assert.assertEquals("https://tokens.mtg.onl/tokens/ORI_010-Thopter.jpg", url.baseUrl);
    url = imageSource.generateTokenUrl(new CardDownloadData("Thopter", "ORI", "0", false, 2, "ORI", ""));
    Assert.assertEquals("https://tokens.mtg.onl/tokens/ORI_011-Thopter.jpg", url.baseUrl);
    url = imageSource.generateTokenUrl(new CardDownloadData("Ashaya, the Awoken World", "ORI", "0", false, 0, "ORI", ""));
    Assert.assertEquals("https://tokens.mtg.onl/tokens/ORI_007-Ashaya,-the-Awoken-World.jpg", url.baseUrl);
    url = imageSource.generateTokenUrl(new CardDownloadData("Emblem Gideon, Ally of Zendikar", "BFZ", "0", false, 0, null, ""));
    Assert.assertEquals("https://tokens.mtg.onl/tokens/BFZ_012-Gideon-Emblem.jpg", url.baseUrl);
}
Also used : CardImageUrls(org.mage.plugins.card.dl.sources.CardImageUrls) CardDownloadData(org.mage.plugins.card.images.CardDownloadData) CardImageSource(org.mage.plugins.card.dl.sources.CardImageSource) Test(org.junit.Test)

Aggregations

Test (org.junit.Test)1 CardImageSource (org.mage.plugins.card.dl.sources.CardImageSource)1 CardImageUrls (org.mage.plugins.card.dl.sources.CardImageUrls)1 CardDownloadData (org.mage.plugins.card.images.CardDownloadData)1