mirror of
https://github.com/magefree/mage.git
synced 2025-12-27 05:52:06 -08:00
Add tokens.mtg.onl token images source
This commit is contained in:
parent
7fff8a1caf
commit
a092f965fa
7 changed files with 1630 additions and 544 deletions
|
|
@ -0,0 +1,32 @@
|
|||
package mage.client.game;
|
||||
|
||||
import org.junit.Assert;
|
||||
import org.junit.Ignore;
|
||||
import org.junit.Test;
|
||||
import org.mage.plugins.card.dl.sources.CardImageSource;
|
||||
import org.mage.plugins.card.dl.sources.TokensMtgImageSource;
|
||||
import org.mage.plugins.card.images.CardDownloadData;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Quercitron
|
||||
*/
|
||||
@Ignore
|
||||
public class TokensMtgImageSourceTest {
|
||||
|
||||
@Test
|
||||
public void generateTokenUrlTest() throws Exception {
|
||||
CardImageSource imageSource = TokensMtgImageSource.getInstance();
|
||||
|
||||
String url = imageSource.generateTokenUrl(new CardDownloadData("Thopter", "ORI", 0, false, 1, "ORI"));
|
||||
Assert.assertEquals("http://tokens.mtg.onl/tokens/ORI_010-Thopter.jpg", url);
|
||||
url = imageSource.generateTokenUrl(new CardDownloadData("Thopter", "ORI", 0, false, 2, "ORI"));
|
||||
Assert.assertEquals("http://tokens.mtg.onl/tokens/ORI_011-Thopter.jpg", url);
|
||||
|
||||
url = imageSource.generateTokenUrl(new CardDownloadData("Ashaya, the Awoken World", "ORI", 0, false, 0, "ORI"));
|
||||
Assert.assertEquals("http://tokens.mtg.onl/tokens/ORI_007-Ashaya,-the-Awoken-World.jpg", url);
|
||||
|
||||
url = imageSource.generateTokenUrl(new CardDownloadData("Emblem Gideon, Ally of Zendikar", "BFZ", 0, false, 0, null));
|
||||
Assert.assertEquals("http://tokens.mtg.onl/tokens/BFZ_012-Gideon-Emblem.jpg", url);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue