public virtual void addUserIdentityLinkWithAuthenticatedTenant()
        {
            identityService.SetAuthentication("aUserId", null, new List <string>()
            {
                TENANT_ONE
            });
            taskService.AddUserIdentityLink(task.Id, "demo", IdentityLinkType.Candidate);

            // then
            Assert.That(taskService.CreateTaskQuery()    //.TaskCandidateUser("demo")
                        .Count(), Is.EqualTo(1L));
        }
Пример #2
0
        public virtual void testCleanupHistoryTaskIdentityLink()
        {
            //given
//JAVA TO C# CONVERTER WARNING: The original Java variable was marked 'final':
//ORIGINAL LINE: final java.util.List<String> ids = prepareHistoricProcesses();
            var ids      = prepareHistoricProcesses();
            var taskList = taskService.CreateTaskQuery()

                           .ToList();

            taskService.AddUserIdentityLink(taskList[0].Id, "someUser", IdentityLinkType.Assignee);

            runtimeService.DeleteProcessInstances(ids, null, true, true);

            //when
            historyService.DeleteHistoricProcessInstancesBulk(ids);

            //then
            Assert.AreEqual(0, historyService.CreateHistoricProcessInstanceQuery(c => c.ProcessDefinitionKey == ONE_TASK_PROCESS)
                            .Count());
            Assert.AreEqual(0, historyService.CreateHistoricIdentityLinkLogQuery()
                            .Count());
        }