From dc3d8675841fae630605ea69280ffce886470947 Mon Sep 17 00:00:00 2001 From: Przemyslaw Hugh Kaznowski Date: Sun, 6 Nov 2022 13:47:27 +0000 Subject: [PATCH] Test fixes and improvements (#9733) * Test fixes and improvements (for debugging) * Remove set log level * Remove info log from CardRepository Co-authored-by: Hugh Kaznowski --- Mage.Sets/src/mage/cards/b/Bushwhack.java | 2 +- Mage.Sets/src/mage/cards/t/TyranidHarridan.java | 2 +- .../org/mage/test/decks/importer/TxtDeckImporterTest.java | 4 ++-- Mage.Verify/src/test/java/mage/verify/VerifyCardDataTest.java | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Mage.Sets/src/mage/cards/b/Bushwhack.java b/Mage.Sets/src/mage/cards/b/Bushwhack.java index b0bcd283b4..ddc88526a3 100644 --- a/Mage.Sets/src/mage/cards/b/Bushwhack.java +++ b/Mage.Sets/src/mage/cards/b/Bushwhack.java @@ -28,7 +28,7 @@ public final class Bushwhack extends CardImpl { )); // * Target creature you control fights target creature you don't control. - this.getSpellAbility().addMode(new Mode(new FightTargetsEffect()) + this.getSpellAbility().addMode(new Mode(new FightTargetsEffect(true)) .addTarget(new TargetControlledCreaturePermanent()) .addTarget(new TargetPermanent(StaticFilters.FILTER_CREATURE_YOU_DONT_CONTROL))); } diff --git a/Mage.Sets/src/mage/cards/t/TyranidHarridan.java b/Mage.Sets/src/mage/cards/t/TyranidHarridan.java index d332e17578..ff111b9f1f 100644 --- a/Mage.Sets/src/mage/cards/t/TyranidHarridan.java +++ b/Mage.Sets/src/mage/cards/t/TyranidHarridan.java @@ -2,7 +2,7 @@ package mage.cards.t; import mage.MageInt; import mage.abilities.common.DealsDamageToAPlayerAllTriggeredAbility; -import mage.abilities.costs.mana.GenericManaCost;; +import mage.abilities.costs.mana.GenericManaCost; import mage.abilities.effects.common.CreateTokenEffect; import mage.abilities.keyword.FlyingAbility; import mage.abilities.keyword.WardAbility; diff --git a/Mage.Tests/src/test/java/org/mage/test/decks/importer/TxtDeckImporterTest.java b/Mage.Tests/src/test/java/org/mage/test/decks/importer/TxtDeckImporterTest.java index 1c4fd8fe31..88776bf36b 100644 --- a/Mage.Tests/src/test/java/org/mage/test/decks/importer/TxtDeckImporterTest.java +++ b/Mage.Tests/src/test/java/org/mage/test/decks/importer/TxtDeckImporterTest.java @@ -22,13 +22,13 @@ public class TxtDeckImporterTest { for (String c : cards) { card = CardRepository.instance.findPreferredCoreExpansionCard(c); - assert card != null; + Assert.assertNotNull(String.format("Card %s was null", c), card); deck.getCards().add(new DeckCardInfo(card.getName(), card.getCardNumber(), card.getSetCode())); } for (String s : sideboard) { card = CardRepository.instance.findPreferredCoreExpansionCard(s); - assert card != null; + Assert.assertNotNull(String.format("Card %s was null", s), card); deck.getSideboard().add(new DeckCardInfo(card.getName(), card.getCardNumber(), card.getSetCode())); } diff --git a/Mage.Verify/src/test/java/mage/verify/VerifyCardDataTest.java b/Mage.Verify/src/test/java/mage/verify/VerifyCardDataTest.java index 721e2071ab..daa206fa68 100644 --- a/Mage.Verify/src/test/java/mage/verify/VerifyCardDataTest.java +++ b/Mage.Verify/src/test/java/mage/verify/VerifyCardDataTest.java @@ -275,7 +275,7 @@ public class VerifyCardDataTest { printMessages(outputMessages); if (failed > 0) { - Assert.fail("found " + failed + " errors in cards verify (see errors list above)"); + Assert.fail(String.format("found %d errors in %d cards verify (see errors list above)", failed, CardScanner.getAllCards().size())); } }