()
| 52 | private UnitSet metricUS; |
| 53 | |
| 54 | @BeforeEach |
| 55 | @Override |
| 56 | protected void setUp() throws Exception |
| 57 | { |
| 58 | super.setUp(); |
| 59 | |
| 60 | final GenericLoader<PCTemplate> loader = new GenericLoader<>(PCTemplate.class); |
| 61 | final LoadContext context = Globals.getContext(); |
| 62 | CampaignSourceEntry source; |
| 63 | try |
| 64 | { |
| 65 | source = new CampaignSourceEntry(new Campaign(), |
| 66 | new URI("file:/" + getClass().getName() + ".java")); |
| 67 | } |
| 68 | catch (URISyntaxException e) |
| 69 | { |
| 70 | throw new UnreachableError(e); |
| 71 | } |
| 72 | |
| 73 | |
| 74 | loader.parseLine(context, null, "Darkvision VISION:Darkvision (60')", |
| 75 | source); |
| 76 | darkvisionT = |
| 77 | context.getReferenceContext().silentlyGetConstructedCDOMObject(PCTemplate.class, |
| 78 | "Darkvision"); |
| 79 | |
| 80 | loader.parseLine(context, null, "Low-light VISION:Low-light", |
| 81 | source); |
| 82 | lowlightT = |
| 83 | context.getReferenceContext().silentlyGetConstructedCDOMObject(PCTemplate.class, |
| 84 | "Low-light"); |
| 85 | |
| 86 | loader.parseLine(context, null, "Astral VISION:Astral (130')", |
| 87 | source); |
| 88 | astralT = |
| 89 | context.getReferenceContext().silentlyGetConstructedCDOMObject(PCTemplate.class, |
| 90 | "Astral"); |
| 91 | |
| 92 | assertTrue(context.getReferenceContext().resolveReferences(null)); |
| 93 | |
| 94 | metricUS = new UnitSet(); |
| 95 | metricUS.setName("Metric"); |
| 96 | metricUS.setDistanceUnit("m"); |
| 97 | metricUS.setDistanceFactor(new BigDecimal("0.3")); |
| 98 | metricUS.setDistanceDisplayPattern(new DecimalFormat("#.##")); |
| 99 | SettingsHandler.getGameAsProperty().get().getModeContext().getReferenceContext().importObject(metricUS); |
| 100 | } |
| 101 | |
| 102 | @AfterEach |
| 103 | @Override |
nothing calls this directly
no test coverage detected