private static void WontAddACityToAFolkTrickThatContainsFolkCity() throws Exception { Assert.Print(" WontAddACityToAFolkTrickThatContainsFolkCity"); // One trick Trick trick = Mother.folkTrick3; stage.AddToCache(trick); // The card to add FateCard card = Mother.cityFolk; stage.AddToCamp(card); List<GameAction> result = sut.GetAvailableActions(); Assert.AreEqual(result.size(), 1, "Incorrect number of actions returned."); pass++; }
private static void CanAddACardToAForestTrick() throws Exception { Assert.Print(" CanAddACardToAForestTrick"); Trick trick = Mother.forestTrick3; stage.AddToCache(trick); // The card to add FateCard card = Mother.forestTreasure; stage.AddToCamp(card); List<GameAction> result = sut.GetAvailableActions(); Assert.AreEqual(result.size(), 2, "Incorrect number of actions returned."); AddToTrick resultAction = null; for (GameAction action : result) { if (action instanceof AddToTrick) { Assert.AreEqual(null, resultAction, "2 candidates AddToTricks have been found."); resultAction = (AddToTrick) action; } } Assert.AreNotEqual((AddToTrick) null, resultAction, "No AddToTrick found."); Assert.AreEqual(trick, resultAction.GetTrick(), "Adding to the wrong trick."); Assert.AreEqual(card, resultAction.GetCard(), "Adding the wrong card to the trick."); pass++; }