protected internal virtual void verifyHistoricBatchJson(string historicBatchJson) { HistoricBatchDto historicBatch = from(historicBatchJson).getObject("", typeof(HistoricBatchDto)); assertNotNull("The returned historic batch should not be null.", historicBatch); assertEquals(MockProvider.EXAMPLE_BATCH_ID, historicBatch.Id); assertEquals(MockProvider.EXAMPLE_BATCH_TYPE, historicBatch.Type); assertEquals(MockProvider.EXAMPLE_BATCH_TOTAL_JOBS, historicBatch.TotalJobs); assertEquals(MockProvider.EXAMPLE_BATCH_JOBS_PER_SEED, historicBatch.BatchJobsPerSeed); assertEquals(MockProvider.EXAMPLE_INVOCATIONS_PER_BATCH_JOB, historicBatch.InvocationsPerBatchJob); assertEquals(MockProvider.EXAMPLE_SEED_JOB_DEFINITION_ID, historicBatch.SeedJobDefinitionId); assertEquals(MockProvider.EXAMPLE_MONITOR_JOB_DEFINITION_ID, historicBatch.MonitorJobDefinitionId); assertEquals(MockProvider.EXAMPLE_BATCH_JOB_DEFINITION_ID, historicBatch.BatchJobDefinitionId); assertEquals(MockProvider.EXAMPLE_TENANT_ID, historicBatch.TenantId); assertEquals(MockProvider.EXAMPLE_USER_ID, historicBatch.CreateUserId); assertEquals(DateTimeUtil.parseDate(MockProvider.EXAMPLE_HISTORIC_BATCH_START_TIME), historicBatch.StartTime); assertEquals(DateTimeUtil.parseDate(MockProvider.EXAMPLE_HISTORIC_BATCH_END_TIME), historicBatch.EndTime); assertEquals(DateTimeUtil.parseDate(MockProvider.EXAMPLE_HISTORIC_BATCH_REMOVAL_TIME), historicBatch.RemovalTime); }
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @SuppressWarnings("unchecked") @Override public java.util.List<org.camunda.bpm.engine.rest.dto.history.batch.HistoricBatchDto> getHistoricBatches(javax.ws.rs.core.UriInfo uriInfo, System.Nullable<int> firstResult, System.Nullable<int> maxResults) public virtual IList <HistoricBatchDto> getHistoricBatches(UriInfo uriInfo, int?firstResult, int?maxResults) { HistoricBatchQueryDto queryDto = new HistoricBatchQueryDto(objectMapper, uriInfo.QueryParameters); HistoricBatchQuery query = queryDto.toQuery(processEngine); IList <HistoricBatch> matchingBatches; if (firstResult != null || maxResults != null) { matchingBatches = (IList <HistoricBatch>)executePaginatedQuery(query, firstResult, maxResults); } else { matchingBatches = query.list(); } IList <HistoricBatchDto> batchResults = new List <HistoricBatchDto>(); foreach (HistoricBatch matchingBatch in matchingBatches) { batchResults.Add(HistoricBatchDto.fromBatch(matchingBatch)); } return(batchResults); }