/// <summary> /// Creates a test job for use in Scenario tests. /// </summary> public static void CreateTestJob(BatchController controller, BatchAccountContext context, string jobId) { RequestInterceptor interceptor = CreateHttpRecordingInterceptor(); BatchClientBehavior[] behaviors = new BatchClientBehavior[] { interceptor }; BatchClient client = new BatchClient(controller.BatchManagementClient, controller.ResourceManagementClient); PSPoolInformation poolInfo = new PSPoolInformation(); poolInfo.PoolId = SharedPool; NewJobParameters parameters = new NewJobParameters(context, jobId, behaviors) { PoolInformation = poolInfo }; client.CreateJob(parameters); }
public PSJobSpecification(PSPoolInformation poolInformation) { this.omObject = new Microsoft.Azure.Batch.JobSpecification(poolInformation.omObject); }
/// <summary> /// Creates a test job for use in Scenario tests. /// </summary> public static void CreateTestJob(BatchController controller, BatchAccountContext context, string jobId) { BatchClient client = new BatchClient(controller.BatchManagementClient, controller.ResourceManagementClient); PSPoolInformation poolInfo = new PSPoolInformation(); poolInfo.PoolId = SharedPool; NewJobParameters parameters = new NewJobParameters(context, jobId) { PoolInformation = poolInfo }; client.CreateJob(parameters); }