public virtual void testDecisionDefinitionUpdateTimeToLiveWithoutAuthorizations() { //given string decisionDefinitionId = selectDecisionDefinitionByKey(DECISION_DEFINITION_KEY).Id; try { //when repositoryService.updateDecisionDefinitionHistoryTimeToLive(decisionDefinitionId, 6); fail("Exception expected"); } catch (AuthorizationException e) { // then string message = e.Message; assertTextPresent(userId, message); assertTextPresent(UPDATE.Name, message); assertTextPresent(DECISION_DEFINITION_KEY, message); assertTextPresent(DECISION_DEFINITION.resourceName(), message); } }
public virtual void testGetDmnModelInstanceWithoutAuthorizations() { // given string decisionDefinitionId = selectDecisionDefinitionByKey(DECISION_DEFINITION_KEY).Id; try { // when repositoryService.getDmnModelInstance(decisionDefinitionId); fail("Exception expected"); } catch (AuthorizationException e) { // then string message = e.Message; assertTextPresent(userId, message); assertTextPresent(READ.Name, message); assertTextPresent(DECISION_DEFINITION_KEY, message); assertTextPresent(DECISION_DEFINITION.resourceName(), message); } }
public virtual void testGetDecisionInstancesWithoutAuthorization() { // given VariableMap variables = Variables.createVariables(); variables.put("input1", null); startProcessInstanceByKey("testProcess", variables); try { // when optimizeService.getHistoricDecisionInstances(new DateTime(0L), null, 10); fail("Exception expected: It should not be possible to retrieve the decision instances"); } catch (AuthorizationException e) { // then string exceptionMessage = e.Message; assertTextPresent(userId, exceptionMessage); assertTextPresent(READ_HISTORY.Name, exceptionMessage); assertTextPresent(DECISION_DEFINITION.resourceName(), exceptionMessage); } }