Test method for pcgen.core.PlayerCharacter#getTotalStatFor(PCStat).
()
| 105 | * Test method for {@link pcgen.core.PlayerCharacter#getTotalStatFor(PCStat)}. |
| 106 | */ |
| 107 | @Test |
| 108 | public void testGetTotalStatFor() |
| 109 | { |
| 110 | PlayerCharacter pc = getCharacter(); |
| 111 | assertEquals("Starting STR should be 6", 6, pc.getTotalStatFor(str)); |
| 112 | |
| 113 | // Bonus should affect total stat |
| 114 | addAbility(BuildUtilities.getFeatCat(), bonus); |
| 115 | pc.calcActiveBonuses(); |
| 116 | assertEquals("Stat should have bonus", 13, pc.getTotalStatFor(str)); |
| 117 | |
| 118 | pc.addTemplate(locker); |
| 119 | assertEquals("Stat should now be locked", 12, pc.getTotalStatFor(str)); |
| 120 | |
| 121 | addAbility(BuildUtilities.getFeatCat(), lockedBonus); |
| 122 | pc.calcActiveBonuses(); |
| 123 | assertEquals("Stat should be locked but bonused", 15, pc.getTotalStatFor(str)); |
| 124 | |
| 125 | pc.addTemplate(unlocker); |
| 126 | assertEquals("Stat should now be unlocked", 13, pc.getTotalStatFor(str)); |
| 127 | } |
| 128 | |
| 129 | /** |
| 130 | * Test out the output of stats where a min value is in place. |
nothing calls this directly
no test coverage detected