From 61fe216569b399dab968581f2e3bbdb6a6677c91 Mon Sep 17 00:00:00 2001 From: theelk801 Date: Wed, 16 Jul 2025 10:20:09 -0400 Subject: [PATCH] add tests for Doctor's companion --- .../deck/CommanderDeckValidationTest.java | 36 +++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/Mage.Tests/src/test/java/org/mage/test/serverside/deck/CommanderDeckValidationTest.java b/Mage.Tests/src/test/java/org/mage/test/serverside/deck/CommanderDeckValidationTest.java index ed0d8d0c10a..bc6b62530da 100644 --- a/Mage.Tests/src/test/java/org/mage/test/serverside/deck/CommanderDeckValidationTest.java +++ b/Mage.Tests/src/test/java/org/mage/test/serverside/deck/CommanderDeckValidationTest.java @@ -107,6 +107,42 @@ public class CommanderDeckValidationTest extends MageTestPlayerBase { "Commanders with the 'Choose a Background' ability should be able to have a background as an additional commander"); } + @Test() + public void testDoctorsCompanion() { + DeckTester deckTester = new DeckTester(new Commander()); + deckTester.addMaindeck("Plains", 98); + + deckTester.addSideboard("The First Doctor", 1); + deckTester.addSideboard("Barbara Wright", 1); + + deckTester.validate("You can have two commanders if one is a Time Lord Doctor and the other has 'Doctor's companion'"); + } + + @Test(expected = AssertionError.class) + public void testDoctorsCompanion2() { + DeckTester deckTester = new DeckTester(new Commander()); + deckTester.addMaindeck("Plains", 98); + + deckTester.addSideboard("The First Doctor", 1); + deckTester.addSideboard("Isamaru, Hound of Konda", 1); + + deckTester.validate("You can't have two commanders if one is a Time Lord Doctor and the other doesn't have 'Doctor's companion'"); + } + + @Test(expected = AssertionError.class) + public void testDoctorsCompanion3() { + DeckTester deckTester = new DeckTester(new Commander()); + deckTester.addMaindeck("Plains", 98); + + deckTester.addSideboard("Mistform Ultimus", 1); + deckTester.addSideboard("Barbara Wright", 1); + + deckTester.validate( + "You can't have two commanders if one has 'Doctor's companion' " + + "but the other has additional creature types in addition to being a Time Lord Doctor" + ); + } + @Test() public void testVehicles1() { DeckTester deckTester = new DeckTester(new Commander());