public virtual void testBatchQueryResult() { var startDate = new DateTime(10000L); var endDate = new DateTime(40000L); // given ClockUtil.CurrentTime = startDate; var batch = helper.MigrateProcessInstancesAsync(1); helper.ExecuteSeedJob(batch); helper.ExecuteJobs(batch); ClockUtil.CurrentTime = endDate; helper.ExecuteMonitorJob(batch); // when var resultBatch = historyService.CreateHistoricBatchQuery() .First(); // then Assert.NotNull(resultBatch); Assert.AreEqual(batch.Id, resultBatch.Id); Assert.AreEqual(batch.BatchJobDefinitionId, resultBatch.BatchJobDefinitionId); Assert.AreEqual(batch.MonitorJobDefinitionId, resultBatch.MonitorJobDefinitionId); Assert.AreEqual(batch.SeedJobDefinitionId, resultBatch.SeedJobDefinitionId); Assert.AreEqual(batch.TenantId, resultBatch.TenantId); Assert.AreEqual(batch.Type, resultBatch.Type); Assert.AreEqual(batch.BatchJobsPerSeed, resultBatch.BatchJobsPerSeed); Assert.AreEqual(batch.InvocationsPerBatchJob, resultBatch.InvocationsPerBatchJob); Assert.AreEqual(batch.TotalJobs, resultBatch.TotalJobs); Assert.AreEqual(startDate, resultBatch.StartTime); Assert.AreEqual(endDate, resultBatch.EndTime); }