Exemple #1
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test public void testBatchByState()
        public virtual void testBatchByState()
        {
            // given
            Batch batch1 = helper.migrateProcessInstancesAsync(1);
            Batch batch2 = helper.migrateProcessInstancesAsync(1);

            helper.completeBatch(batch1);

            // when
            HistoricBatch historicBatch = historyService.createHistoricBatchQuery().completed(true).singleResult();

            // then
            assertEquals(batch1.Id, historicBatch.Id);

            // when
            historicBatch = historyService.createHistoricBatchQuery().completed(false).singleResult();

            // then
            assertEquals(batch2.Id, historicBatch.Id);
        }
Exemple #2
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test public void testQuery()
        public virtual void testQuery()
        {
            IList <BatchStatistics> statistics = managementService.createBatchStatisticsQuery().list();

            assertEquals(0, statistics.Count);

            Batch batch1 = helper.createMigrationBatchWithSize(1);

            statistics = managementService.createBatchStatisticsQuery().list();
            assertEquals(1, statistics.Count);
            assertEquals(batch1.Id, statistics[0].Id);

            Batch batch2 = helper.createMigrationBatchWithSize(1);
            Batch batch3 = helper.createMigrationBatchWithSize(1);

            statistics = managementService.createBatchStatisticsQuery().list();
            assertEquals(3, statistics.Count);

            helper.completeBatch(batch1);
            helper.completeBatch(batch3);

            statistics = managementService.createBatchStatisticsQuery().list();
            assertEquals(1, statistics.Count);
            assertEquals(batch2.Id, statistics[0].Id);

            helper.completeBatch(batch2);

            statistics = managementService.createBatchStatisticsQuery().list();
            assertEquals(0, statistics.Count);
        }