private void createProcessInstanceMock() { ProcessInstance mockInstance = MockProvider.createMockInstance(); ProcessInstanceQuery mockInstanceQuery = mock(typeof(ProcessInstanceQuery)); when(mockInstanceQuery.processInstanceId(eq(MockProvider.EXAMPLE_PROCESS_INSTANCE_ID))).thenReturn(mockInstanceQuery); when(mockInstanceQuery.singleResult()).thenReturn(mockInstance); when(mockRuntimeService.createProcessInstanceQuery()).thenReturn(mockInstanceQuery); }
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Test public void correlateMessageToStartEventNoTenantIdSetForNonTenant() public virtual void correlateMessageToStartEventNoTenantIdSetForNonTenant() { testRule.deploy(MESSAGE_START_PROCESS); engineRule.RuntimeService.createMessageCorrelation("message").correlate(); ProcessInstanceQuery query = engineRule.RuntimeService.createProcessInstanceQuery(); assertThat(query.count(), @is(1L)); assertThat(query.singleResult().TenantId, @is(nullValue())); }
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Test public void correlateStartMessageWithoutTenantId() public virtual void correlateStartMessageWithoutTenantId() { testRule.deploy(MESSAGE_START_PROCESS); testRule.deployForTenant(TENANT_ONE, MESSAGE_START_PROCESS); engineRule.RuntimeService.createMessageCorrelation("message").withoutTenantId().correlateStartMessage(); ProcessInstanceQuery query = engineRule.RuntimeService.createProcessInstanceQuery(); assertThat(query.count(), @is(1L)); assertThat(query.singleResult().TenantId, @is(nullValue())); }
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Test public void sendSignalToStartEventForNonTenant() public virtual void sendSignalToStartEventForNonTenant() { testRule.deploy(SIGNAL_START_PROCESS); testRule.deployForTenant(TENANT_ONE, SIGNAL_START_PROCESS); engineRule.RuntimeService.createSignalEvent("signal").withoutTenantId().send(); ProcessInstanceQuery query = engineRule.RuntimeService.createProcessInstanceQuery(); assertThat(query.count(), @is(1L)); assertThat(query.singleResult().TenantId, @is(nullValue())); }