Skip to content

Commit

Permalink
sealeds test class for update url easier
Browse files Browse the repository at this point in the history
  • Loading branch information
nicol authored and nicol committed Sep 24, 2023
1 parent c2ff968 commit cd91d42
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/main/resources/data/boosters.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1734,11 +1734,14 @@
<booster lang='en' num='2'
url="https://poromagia.com/media/images/products/2017/09/Ixalan-Booster-1-148585.jpg" />
<booster lang='en' num='3'
url="http://magiccards.nl/wp-content/uploads/2017/09/Ixalan-boosterpack-4.png?v=796834e7a283" />
url="https://www.magicsur.cl/7745-thickbox_default/ixalan-sobre-magic-the-gathering.jpg" />
<booster lang='de' num='4'
url="https://www.trader-online.de/out/pictures/generated/product/3/800_800_75/ixalan_booster_pack_packung_box_deutsch_german_magic_the_gathering_mtg_3.png" />
url="https://www.magicsur.cl/7744-thickbox_default/ixalan-sobre-magic-the-gathering.jpg" />
<set lang='en'
url="https://media-dominaria.cursecdn.com/avatars/thumbnails/133/153/320/160/636390134824986390.png" />

<prereleasepack lang="en" num="1" url="https://mundodelcomic.com/cdn/shop/products/b28b728c-ce58-58da-9ef9-58a6cb73f52e_2f1b9753-bb03-4b64-bdfc-2f1e69d4252f_1000x1000.png?v=1693962269"/>

</edition>

<edition id='M19'>
Expand Down
40 changes: 40 additions & 0 deletions src/test/java/test/TestSealeds.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
package test;

import java.io.IOException;
import java.sql.SQLException;

import org.apache.logging.log4j.Level;
import org.junit.Test;
import org.magic.api.interfaces.MTGCardsProvider;
import org.magic.api.interfaces.MTGSealedProvider;
import org.magic.services.MTGControler;
import org.magic.services.logging.MTGLogger;
import org.magic.services.tools.MTG;

public class TestSealeds {



@Test
public void testUrls() throws SQLException, IOException
{
MTGControler.getInstance().init();

MTGLogger.changeLevel(Level.OFF);

var prov = MTG.getEnabledPlugin(MTGCardsProvider.class);
var plug = MTG.getEnabledPlugin(MTGSealedProvider.class);


for(var ed : prov.listEditions().stream().filter(ed->ed.getId().equals("XLN")).toList())
{
var items = plug.getItemsFor(ed);

for(var s : items)
System.out.println(ed.getId() + "\t" + s.getTypeProduct() + "\t"+s.getNum()+"\t : " +(plug.getPictureFor(s)!=null));

}


}
}

0 comments on commit cd91d42

Please sign in to comment.