Exemplo n.º 1
0
        public virtual BatchStatistics build()
        {
            BatchStatistics batchStatistics = mock(typeof(BatchStatistics));

            when(batchStatistics.Id).thenReturn(id_Renamed);
            when(batchStatistics.Type).thenReturn(type_Renamed);
            when(batchStatistics.TotalJobs).thenReturn(size_Renamed);
            when(batchStatistics.JobsCreated).thenReturn(jobsCreated_Renamed);
            when(batchStatistics.BatchJobsPerSeed).thenReturn(batchJobsPerSeed_Renamed);
            when(batchStatistics.InvocationsPerBatchJob).thenReturn(invocationsPerBatchJob_Renamed);
            when(batchStatistics.SeedJobDefinitionId).thenReturn(seedJobDefinitionId_Renamed);
            when(batchStatistics.MonitorJobDefinitionId).thenReturn(monitorJobDefinitionId_Renamed);
            when(batchStatistics.BatchJobDefinitionId).thenReturn(batchJobDefinitionId_Renamed);
            when(batchStatistics.TenantId).thenReturn(tenantId_Renamed);
            when(batchStatistics.CreateUserId).thenReturn(createUserId_Renamed);
            when(batchStatistics.RemainingJobs).thenReturn(remainingJobs_Renamed);
            when(batchStatistics.CompletedJobs).thenReturn(completedJobs_Renamed);
            when(batchStatistics.FailedJobs).thenReturn(failedJobs_Renamed);
            when(batchStatistics.Suspended).thenReturn(suspended_Renamed);
            return(batchStatistics);
        }
Exemplo n.º 2
0
        public static BatchStatisticsDto fromBatchStatistics(BatchStatistics batchStatistics)
        {
            BatchStatisticsDto dto = new BatchStatisticsDto();

            dto.id                     = batchStatistics.Id;
            dto.type                   = batchStatistics.Type;
            dto.totalJobs              = batchStatistics.TotalJobs;
            dto.jobsCreated            = batchStatistics.JobsCreated;
            dto.batchJobsPerSeed       = batchStatistics.BatchJobsPerSeed;
            dto.invocationsPerBatchJob = batchStatistics.InvocationsPerBatchJob;
            dto.seedJobDefinitionId    = batchStatistics.SeedJobDefinitionId;
            dto.monitorJobDefinitionId = batchStatistics.MonitorJobDefinitionId;
            dto.batchJobDefinitionId   = batchStatistics.BatchJobDefinitionId;
            dto.tenantId               = batchStatistics.TenantId;
            dto.createUserId           = batchStatistics.CreateUserId;
            dto.suspended              = batchStatistics.Suspended;

            dto.remainingJobs = batchStatistics.RemainingJobs;
            dto.completedJobs = batchStatistics.CompletedJobs;
            dto.failedJobs    = batchStatistics.FailedJobs;
            return(dto);
        }