()
| 77 | private Equipment armor = null; |
| 78 | |
| 79 | @BeforeEach |
| 80 | @Override |
| 81 | protected void setUp() throws Exception |
| 82 | { |
| 83 | super.setUp(); |
| 84 | |
| 85 | final LevelInfo levelInfo = new LevelInfo(); |
| 86 | levelInfo.setLevelString("LEVEL"); |
| 87 | levelInfo.setMaxClassSkillString("LEVEL+3"); |
| 88 | levelInfo.setMaxCrossClassSkillString("(LEVEL+3)/2"); |
| 89 | GameMode gamemode = SettingsHandler.getGameAsProperty().get(); |
| 90 | gamemode.addLevelInfo("Default", levelInfo); |
| 91 | |
| 92 | LoadContext context = Globals.getContext(); |
| 93 | |
| 94 | BonusObj aBonus = Bonus.newBonus(context, "MODSKILLPOINTS|NUMBER|INT"); |
| 95 | |
| 96 | if (aBonus != null) |
| 97 | { |
| 98 | intel.addToListFor(ListKey.BONUS, aBonus); |
| 99 | } |
| 100 | |
| 101 | Race testRace = new Race(); |
| 102 | testRace.setName("TestRace"); |
| 103 | context.getReferenceContext().importObject(testRace); |
| 104 | |
| 105 | PCClass myClass = new PCClass(); |
| 106 | myClass.setName("MyClass"); |
| 107 | myClass.put(FormulaKey.START_SKILL_POINTS, FormulaFactory.getFormulaFor(3)); |
| 108 | context.getReferenceContext().importObject(myClass); |
| 109 | |
| 110 | // Skills |
| 111 | knowledge = new Skill[2]; |
| 112 | knowledge[0] = new Skill(); |
| 113 | context.unconditionallyProcess(knowledge[0], "CLASSES", "MyClass"); |
| 114 | knowledge[0].setName("KNOWLEDGE (ARCANA)"); |
| 115 | TestHelper.addType(knowledge[0], "KNOWLEDGE.INT"); |
| 116 | CDOMDirectSingleRef<PCStat> intelRef = CDOMDirectSingleRef.getRef(intel); |
| 117 | knowledge[0].put(ObjectKey.KEY_STAT, intelRef); |
| 118 | Globals.getContext().getReferenceContext().importObject(knowledge[0]); |
| 119 | |
| 120 | knowledge[1] = new Skill(); |
| 121 | context.unconditionallyProcess(knowledge[1], "CLASSES", "MyClass"); |
| 122 | knowledge[1].setName("KNOWLEDGE (RELIGION)"); |
| 123 | TestHelper.addType(knowledge[1], "KNOWLEDGE.INT"); |
| 124 | knowledge[1].put(ObjectKey.KEY_STAT, intelRef); |
| 125 | Globals.getContext().getReferenceContext().importObject(knowledge[1]); |
| 126 | |
| 127 | tumble = new Skill(); |
| 128 | context.unconditionallyProcess(tumble, "CLASSES", "MyClass"); |
| 129 | tumble.setName("Tumble"); |
| 130 | tumble.addToListFor(ListKey.TYPE, Type.getConstant("DEX")); |
| 131 | CDOMDirectSingleRef<PCStat> dexRef = CDOMDirectSingleRef.getRef(dex); |
| 132 | tumble.put(ObjectKey.KEY_STAT, dexRef); |
| 133 | Globals.getContext().getReferenceContext().importObject(tumble); |
| 134 | |
| 135 | balance = new Skill(); |
| 136 | context.unconditionallyProcess(balance, "CLASSES", "MyClass"); |
nothing calls this directly
no test coverage detected