Test out the output of stats where a min value is in place.
()
| 130 | * Test out the output of stats where a min value is in place. |
| 131 | */ |
| 132 | @Test |
| 133 | public void testMinValueStat() |
| 134 | { |
| 135 | PlayerCharacter pc = getCharacter(); |
| 136 | assertEquals("Starting STR should be 6", 6, pc.getTotalStatFor(str)); |
| 137 | assertEquals("Starting STR mod", -2, pc.getStatModFor(str)); |
| 138 | |
| 139 | // With template lock |
| 140 | PCTemplate statMinValTemplate = new PCTemplate(); |
| 141 | statMinValTemplate.setName("minval"); |
| 142 | statMinValTemplate.addToListFor(ListKey.STAT_MINVALUE, new StatLock( |
| 143 | CDOMDirectSingleRef.getRef(str), FormulaFactory.getFormulaFor(8))); |
| 144 | pc.addTemplate(statMinValTemplate); |
| 145 | assertEquals("STR now has minimum value", 8, pc.getTotalStatFor(str)); |
| 146 | assertEquals("Starting STR mod", -1, pc.getStatModFor(str)); |
| 147 | pc.removeTemplate(statMinValTemplate); |
| 148 | assertEquals("STR no longer has minimum value", 6, pc.getTotalStatFor(str)); |
| 149 | assertEquals("Starting STR mod", -2, pc.getStatModFor(str)); |
| 150 | } |
| 151 | |
| 152 | } |
nothing calls this directly
no test coverage detected