diff --git a/Mage.Client/src/main/java/mage/client/dialog/TestCardRenderDialog.java b/Mage.Client/src/main/java/mage/client/dialog/TestCardRenderDialog.java index 8bcdaf1216..17f9d05e8e 100644 --- a/Mage.Client/src/main/java/mage/client/dialog/TestCardRenderDialog.java +++ b/Mage.Client/src/main/java/mage/client/dialog/TestCardRenderDialog.java @@ -316,7 +316,7 @@ public class TestCardRenderDialog extends MageDialog { //cardViews.add(createHandCard(game, playerYou.getId(), "ZNR", "134")); // Akoum Warrior //*/ - // test meld cards in hands and battlefield + /*// test meld cards in hands and battlefield cardViews.add(createHandCard(game, playerYou.getId(), "EMN", "204")); // Hanweir Battlements cardViews.add(createHandCard(game, playerYou.getId(), "EMN", "130a")); // Hanweir Garrison cardViews.add(createHandCard(game, playerYou.getId(), "EMN", "130b")); // Hanweir, the Writhing Township @@ -325,7 +325,16 @@ public class TestCardRenderDialog extends MageDialog { cardViews.add(createPermanentCard(game, playerYou.getId(), "EMN", "130b", 1, 1, 0, false, false, null)); // Hanweir, the Writhing Township //*/ - /* //test card icons + // test variant double faced cards (main and second sides must be same pair) + cardViews.add(createHandCard(game, playerYou.getId(), "VOW", "65")); // Jacob Hauken, Inspector + cardViews.add(createHandCard(game, playerYou.getId(), "VOW", "320")); // Jacob Hauken, Inspector + cardViews.add(createHandCard(game, playerYou.getId(), "VOW", "332")); // Jacob Hauken, Inspector + cardViews.add(createPermanentCard(game, playerYou.getId(), "VOW", "65", 1, 1, 0, false, false, null)); // Jacob Hauken, Inspector + cardViews.add(createPermanentCard(game, playerYou.getId(), "VOW", "320", 1, 1, 0, false, false, null)); // Jacob Hauken, Inspector + cardViews.add(createPermanentCard(game, playerYou.getId(), "VOW", "332", 1, 1, 0, false, false, null)); // Jacob Hauken, Inspector + //*/ + + /*//test card icons cardViews.add(createHandCard(game, playerYou.getId(), "POR", "169")); // Grizzly Bears cardViews.add(createHandCard(game, playerYou.getId(), "DKA", "140")); // Huntmaster of the Fells, transforms cardViews.add(createPermanentCard(game, playerYou.getId(), "DKA", "140", 3, 3, 1, false, true, additionalIcons)); // Huntmaster of the Fells, transforms diff --git a/Mage.Tests/src/test/java/org/mage/test/utils/CardRepositoryTest.java b/Mage.Tests/src/test/java/org/mage/test/utils/CardRepositoryTest.java index c047431553..b2ac202ff5 100644 --- a/Mage.Tests/src/test/java/org/mage/test/utils/CardRepositoryTest.java +++ b/Mage.Tests/src/test/java/org/mage/test/utils/CardRepositoryTest.java @@ -2,7 +2,9 @@ package org.mage.test.utils; import mage.cards.repository.CardInfo; import mage.cards.repository.CardRepository; +import mage.cards.repository.CardScanner; import org.junit.Assert; +import org.junit.Before; import org.junit.Test; import java.util.List; @@ -10,17 +12,22 @@ import java.util.List; /** * Testing of CardRepository functionality. * - * @author Alex-Vasile + * @author Alex-Vasile, JayDi85 */ public class CardRepositoryTest { + @Before + public void setUp() { + CardScanner.scan(); + } + /** * Test CardRepository.findCards for the difficult cases when provided with the full card name. - * + *
* CardRepository.findCards is used only for testing purposes. */ @Test - public void testFindSplitCardsByFullName() { + public void test_FindSplitCardsByFullName() { // Modal double-faced assertFindCard("Malakir Rebirth // Malakir Mire"); // Transform double-faced @@ -35,11 +42,11 @@ public class CardRepositoryTest { /** * Test CardRepository.findCards for the difficult cases. - * + *
* CardRepository.findCards is used only for testing purposes. */ @Test - public void testFindSplitCardsByMainName() { + public void test_FindSplitCardsByMainName() { // Modal double-faced assertFindCard("Malakir Rebirth"); // Transform double-faced @@ -54,11 +61,11 @@ public class CardRepositoryTest { /** * Test CardRepository.findCards for the difficult cases. - * + *
* CardRepository.findCards is used only for testing purposes. */ @Test - public void testFindSplitCardsBySecondName() { + public void test_FindSplitCardsBySecondName() { // Modal double-faced assertFindCard("Malakir Mire"); // Transform double-faced @@ -73,11 +80,11 @@ public class CardRepositoryTest { /** * Test CardRepository.findCardsCaseInsensitive for the difficult cases. - * + *
* CardRepository.findCardsCaseInsensitive is used for actual game */ @Test - public void testFindSplitCardsByFullNameCaseInsensitive() { + public void test_FindSplitCardsByFullNameCaseInsensitive() { // Modal double-faced assertFindCard("malakIR rebirTH // maLAkir mIRe"); // Transform double-faced @@ -92,11 +99,11 @@ public class CardRepositoryTest { /** * Test CardRepository.findCards for the difficult cases. - * + *
* CardRepository.findCards is used only for testing purposes. */ @Test - public void testFindSplitCardsByMainNameCaseInsensitive() { + public void test_FindSplitCardsByMainNameCaseInsensitive() { // Modal double-faced assertFindCard("malakIR rebirTH"); // Transform double-faced @@ -111,11 +118,11 @@ public class CardRepositoryTest { /** * Test CardRepository.findCards for the difficult cases. - * + *
* CardRepository.findCards is used only for testing purposes. */ @Test - public void testFindSplitCardsBySecondNameCaseInsensitive() { + public void test_FindSplitCardsBySecondNameCaseInsensitive() { // Modal double-faced assertFindCard("maLAkir mIRe"); // Transform double-faced @@ -130,13 +137,13 @@ public class CardRepositoryTest { /** * Reported bug: https://github.com/magefree/mage/issues/9533 - * + *
* Each half of a split card displays the combined information of both halves in the deck editor. - * + *
* `findCards`'s `returnSplitCardHalf` parameter should handle this issue
*/
@Test
- public void splitCardInfoIsntDoubled() {
+ public void test_splitCardInfoIsntDoubled() {
// Consecrate // Consume
// {1}{W/B} // {2}{W}{B}
List