Ejemplo n.º 1
0
            public Void execute(CommandContext commandContext)
            {
                AuthorizationManager authorizationManager = outerInstance.spyOnSession(commandContext, typeof(AuthorizationManager));

                TaskQueryImpl      taskQuery = (TaskQueryImpl)spy(outerInstance.processEngine.TaskService.createTaskQuery());
                AuthorizationCheck authCheck = spy(new AuthorizationCheck());

                when(taskQuery.AuthCheck).thenReturn(authCheck);

                taskQuery.list();

                verify(authorizationManager, atLeastOnce()).filterAuthenticatedGroupIds(eq(testGroupIds));
                verify(authCheck).AuthGroupIds = eq(System.Linq.Enumerable.Empty <string>());

                return(null);
            }
Ejemplo n.º 2
0
            public Void execute(CommandContext commandContext)
            {
                AuthorizationManager authorizationManager = outerInstance.spyOnSession(commandContext, typeof(AuthorizationManager));

                TaskQueryImpl      taskQuery = (TaskQueryImpl)spy(outerInstance.processEngine.TaskService.createTaskQuery());
                AuthorizationCheck authCheck = spy(new AuthorizationCheck());

                when(taskQuery.AuthCheck).thenReturn(authCheck);

                taskQuery.list();

                verify(authorizationManager, atLeastOnce()).filterAuthenticatedGroupIds(eq(testGroupIds));
                verify(authCheck, atLeastOnce()).AuthGroupIds = (IList <string>)argThat(containsInAnyOrder(testGroupIds.ToArray()));

                return(null);
            }