public virtual void testGetCompletedProcessInstancesWithoutAuthorization() { // given startProcessInstanceByKey("process"); try { // when optimizeService.getCompletedHistoricProcessInstances(new DateTime(0L), null, 10); fail("Exception expected: It should not be possible to retrieve the activities"); } 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 getCompletedHistoricProcessInstances() public virtual void getCompletedHistoricProcessInstances() { // given BpmnModelInstance simpleDefinition = Bpmn.createExecutableProcess("process").startEvent().endEvent().done(); testHelper.deploy(simpleDefinition); runtimeService.startProcessInstanceByKey("process"); // when IList <HistoricProcessInstance> completedHistoricProcessInstances = optimizeService.getCompletedHistoricProcessInstances(pastDate(), null, 10); // then assertThat(completedHistoricProcessInstances.Count, @is(1)); assertThatInstanceHasAllImportantInformation(completedHistoricProcessInstances[0]); }