public virtual void testGetHistoricIdentityLinkLogWithoutAuthorization() { // given startProcessInstanceByKey("process"); try { // when optimizeService.getHistoricIdentityLinkLogs(new DateTime(0L), null, 10); fail("Exception expected: It should not be possible to retrieve the logs"); } catch (AuthorizationException e) { // then string exceptionMessage = e.Message; assertTextPresent(userId, exceptionMessage); assertTextPresent(READ_HISTORY.Name, exceptionMessage); assertTextPresent(PROCESS_DEFINITION.resourceName(), exceptionMessage); } }
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Test public void allNecessaryInformationIsAvailable() public virtual void allNecessaryInformationIsAvailable() { // given BpmnModelInstance simpleDefinition = Bpmn.createExecutableProcess("process").startEvent("startEvent").userTask("userTask").name("task").endEvent("endEvent").done(); testHelper.deploy(simpleDefinition); ProcessInstance processInstance = runtimeService.startProcessInstanceByKey("process"); string taskId = taskService.createTaskQuery().singleResult().Id; identityService.AuthenticatedUserId = assignerId; taskService.addCandidateUser(taskId, userId); // when IList <OptimizeHistoricIdentityLinkLogEntity> identityLinkLogs = optimizeService.getHistoricIdentityLinkLogs(pastDate(), null, 10); // then assertThat(identityLinkLogs.Count, @is(1)); assertThatIdentityLinksHaveAllImportantInformation(identityLinkLogs[0], processInstance); }