public void MaintainArmyValid() { // Add to treasury to ensure the army can be maintained int treasuryOld = MyPlayerCharacter.GetHomeFief().GetAvailableTreasury(); MyPlayerCharacter.GetHomeFief().AdjustTreasury(200000); this.MaintainArmyTest(client, OwnedArmy.armyID); // Set army maintenance status to unmaintained OwnedArmy.isMaintained = false; // Reset treasury to old amount MyPlayerCharacter.GetHomeFief().AdjustTreasury(treasuryOld - MyPlayerCharacter.GetHomeFief().GetAvailableTreasury()); }
public void MaintainArmyInsufficientFunds() { // Remove from treasury to ensure the army can be maintained int treasuryOld = MyPlayerCharacter.GetHomeFief().GetAvailableTreasury(); MyPlayerCharacter.GetHomeFief().AdjustTreasury(-treasuryOld); // Ensure army has not been maintained already OwnedArmy.isMaintained = false; Assert.AreEqual(DisplayMessages.ArmyMaintainInsufficientFunds, this.MaintainArmyTest(client, OwnedArmy.armyID)); // Reset treasury MyPlayerCharacter.GetHomeFief().AdjustTreasury(treasuryOld); }