예제 #1
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test public void testQueryList()
        public virtual void testQueryList()
        {
            // given
            authRule.createGrantAuthorization(Resources.BATCH, batch1.Id, "user", Permissions.READ);

            // when
            authRule.enableAuthorization("user");
            IList <Batch> batches = engineRule.ManagementService.createBatchQuery().list();

            authRule.disableAuthorization();

            // then
            Assert.assertEquals(1, batches.Count);
            Assert.assertEquals(batch1.Id, batches[0].Id);
        }
예제 #2
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test public void testQueryList()
        public virtual void testQueryList()
        {
            // given
            authRule.createGrantAuthorization(Resources.BATCH, batch1.Id, "user", Permissions.READ);

            // when
            authRule.enableAuthorization("user");
            IList <BatchStatistics> batches = engineRule.ManagementService.createBatchStatisticsQuery().list();

            authRule.disableAuthorization();

            // then
            Assert.assertEquals(1, batches.Count);
            Assert.assertEquals(batch1.Id, batches[0].Id);

            // and the visibility of jobs is not restricted
            Assert.assertEquals(1, batches[0].JobsCreated);
            Assert.assertEquals(1, batches[0].RemainingJobs);
            Assert.assertEquals(1, batches[0].TotalJobs);
        }
예제 #3
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @After public void tearDown()
        public virtual void tearDown()
        {
            authRule.disableAuthorization();
            authRule.deleteUsersAndGroups();
            processEngineConfiguration.DisabledPermissions = null;
        }