Test method for pcgen.core.DataSet#getEquipmentLocations(). Validate that known body structures get added.
()
| 80 | * that known body structures get added. |
| 81 | */ |
| 82 | public static void getEquipmentLocations() |
| 83 | { |
| 84 | final String structName = "TestStruct"; |
| 85 | SystemCollections.addToBodyStructureList(structName, SettingsHandler.getGameAsProperty().get().getName()); |
| 86 | DataSet dataset = |
| 87 | new DataSet(Globals.getContext(), SettingsHandler.getGameAsProperty().get(), |
| 88 | new DefaultListFacade<>()); |
| 89 | ListFacade<BodyStructure> locations = |
| 90 | dataset.getEquipmentLocations(); |
| 91 | assertNotNull(locations, "Body Structure should not be null"); |
| 92 | // TODO i18n this. It should be the same value as structname, not the localized value. |
| 93 | assertTrue( |
| 94 | checkBodyStructurePresent(locations, "Teststruct"), |
| 95 | "Expected to find added body structure '" + structName + "'" |
| 96 | ); |
| 97 | assertTrue(checkBodyStructurePresent( |
| 98 | locations, Constants.EQUIP_LOCATION_EQUIPPED), "Expected to find Equipped"); |
| 99 | assertTrue(checkBodyStructurePresent( |
| 100 | locations, Constants.EQUIP_LOCATION_CARRIED), "Expected to find Carried"); |
| 101 | assertTrue(checkBodyStructurePresent( |
| 102 | locations, Constants.EQUIP_LOCATION_NOTCARRIED), "Expected to find Not Carried"); |
| 103 | assertEquals(4, locations |
| 104 | .getSize(), "Incorrect size of body structures list"); |
| 105 | } |
| 106 | |
| 107 | /** |
| 108 | * Verify the getPrereqAbilities method is functioning correctly. |
no test coverage detected