From 3a1b7415091a8dff231dab6eb37d54c2533a9f11 Mon Sep 17 00:00:00 2001 From: Oleg Agafonov Date: Sat, 8 Aug 2020 23:38:47 +0400 Subject: [PATCH] Fixed test --- .../src/test/java/mage/verify/VerifyCardDataTest.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/Mage.Verify/src/test/java/mage/verify/VerifyCardDataTest.java b/Mage.Verify/src/test/java/mage/verify/VerifyCardDataTest.java index 62ceb0979d6..e9b3550a4fa 100644 --- a/Mage.Verify/src/test/java/mage/verify/VerifyCardDataTest.java +++ b/Mage.Verify/src/test/java/mage/verify/VerifyCardDataTest.java @@ -193,8 +193,9 @@ public class VerifyCardDataTest { skipListAddName(SKIP_LIST_SCRYFALL_DOWNLOAD_SETS, "SWS"); // Star Wars // sample decks checking - some decks can contains unimplemented cards, so ignore it + // for linux/windows build system use paths constructor skipListCreate(SKIP_LIST_SAMPLE_DECKS); - skipListAddName(SKIP_LIST_SAMPLE_DECKS, "\\Commander\\Commander 2019\\Merciless Rage.dck"); // TODO: delete after Aeon Engine implemented + skipListAddName(SKIP_LIST_SAMPLE_DECKS, Paths.get("\\Commander\\Commander 2019\\Merciless Rage.dck").toString()); // TODO: delete after Aeon Engine implemented } private final ArrayList outputMessages = new ArrayList<>(); @@ -481,7 +482,7 @@ public class VerifyCardDataTest { Collection errorsList = new ArrayList<>(); // collect all files - final String rootPath = "..\\Mage.Client\\release\\sample-decks\\"; + final String rootPath = Paths.get("..\\Mage.Client\\release\\sample-decks").toString(); Collection filesList = new ArrayList<>(); try { Files.walkFileTree(Paths.get(rootPath), new SimpleFileVisitor() { @@ -495,12 +496,12 @@ public class VerifyCardDataTest { e.printStackTrace(); errorsList.add("Error: sample deck - can't get folder content - " + e.getMessage()); } - Assert.assertTrue("Sample decks: can't find any deck files", filesList.size() > 0); + Assert.assertTrue("Sample decks: can't find any deck files in " + rootPath, filesList.size() > 0); // try to open deck files int totalErrorFiles = 0; for (Path deckFile : filesList) { - String deckName = "\\" + deckFile.toString().replace(rootPath, ""); + String deckName = deckFile.toString().replace(rootPath, ""); if (skipListHaveName(SKIP_LIST_SAMPLE_DECKS, deckName)) { continue; }