mirror of
https://github.com/correl/mage.git
synced 2024-11-14 03:00:10 +00:00
Tests: migrate to new mtgjson version
This commit is contained in:
parent
93d3ee4a93
commit
46d5b228cf
3 changed files with 5 additions and 3 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -95,6 +95,8 @@ Mage.Verify/AllCards.json.zip
|
|||
Mage.Verify/AllSets.json.zip
|
||||
Mage.Verify/AllCards.json
|
||||
Mage.Verify/AllSets.json
|
||||
Mage.Verify/AllPrintings.json
|
||||
Mage.Verify/AllPrintings.json.zip
|
||||
Mage.Verify/db
|
||||
|
||||
releases
|
||||
|
|
|
@ -113,7 +113,7 @@ public final class MtgJson {
|
|||
}
|
||||
|
||||
private static Map<String, JsonSet> loadAllSets() throws IOException {
|
||||
return readFromZip("AllSets.json.zip", new TypeReference<Map<String, JsonSet>>() {
|
||||
return readFromZip("AllPrintings.json.zip", new TypeReference<Map<String, JsonSet>>() {
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -122,7 +122,7 @@ public final class MtgJson {
|
|||
if (stream == null) {
|
||||
File file = new File(filename);
|
||||
if (!file.exists()) {
|
||||
URLConnection connection = new URL("https://mtgjson.com/json/" + filename).openConnection();
|
||||
URLConnection connection = new URL("https://mtgjson.com/files/" + filename).openConnection();
|
||||
connection.setRequestProperty("user-agent", "xmage");
|
||||
InputStream download = connection.getInputStream();
|
||||
Files.copy(download, file.toPath(), StandardCopyOption.REPLACE_EXISTING);
|
||||
|
|
|
@ -765,7 +765,7 @@ public class VerifyCardDataTest {
|
|||
checkSupertypes(card, ref);
|
||||
checkTypes(card, ref);
|
||||
checkColors(card, ref);
|
||||
//checkNumbers(card, ref); // TODO: load data from allsets.json and check it (allcards.json do not have card numbers)
|
||||
//checkNumbers(card, ref); // TODO: load data from AllPrintings.json and check it (allcards.json do not have card numbers)
|
||||
checkBasicLands(card, ref);
|
||||
checkMissingAbilities(card, ref);
|
||||
checkWrongSymbolsInRules(card);
|
||||
|
|
Loading…
Reference in a new issue