Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**
- * @see {@link EncounterService#saveEncounterType(EncounterType)}}
- * @see {@link EncounterService#checkIfEncounterTypesAreLocked()}}
- */
- @Test(expected = EncounterTypeLockedException.class)
- @Verifies(value = "should throw error when trying to save encounter type when encounter types are locked", method = "saveEncounterType(EncounterType)")
- public void saveEncounterType_shouldThrowErrorWhenTryingToSaveEncounterTypeWhenEncounterTypesAreLocked() throws Exception {
- GlobalProperty gp = new GlobalProperty(
- OpenmrsConstants.GLOBAL_PROPERTY_ENCOUNTER_TYPES_LOCKED);
- gp.setPropertyValue("true");
- Context.getAdministrationService().saveGlobalProperty(gp);
- EncounterService encounterService = Context.getEncounterService();
- EncounterType encounterType = Context.getEncounterService().getEncounterType(1);
- Assert.assertNotNull(encounterType);
- encounterService.saveEncounterType(encounterType);
- }
Advertisement
Add Comment
Please, Sign In to add comment