-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
sealeds test class for update url easier
- Loading branch information
nicol
authored and
nicol
committed
Sep 24, 2023
1 parent
c2ff968
commit cd91d42
Showing
2 changed files
with
45 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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)); | ||
|
||
} | ||
|
||
|
||
} | ||
} |