public void NewBatchJobScheduleParametersTest()
        {
            // Setup cmdlet without the required parameters
            BatchAccountContext context = BatchTestHelpers.CreateBatchContextWithKeys();

            cmdlet.BatchContext = context;

            Assert.Throws <ArgumentNullException>(() => cmdlet.ExecuteCmdlet());

            cmdlet.Id = "testJobSchedule";

            // Don't go to the service on an Add CloudJobSchedule call
            RequestInterceptor interceptor = BatchTestHelpers.CreateFakeServiceResponseInterceptor <
                JobScheduleAddParameter,
                JobScheduleAddOptions,
                AzureOperationHeaderResponse <JobScheduleAddHeaders> >();

            cmdlet.AdditionalBehaviors = new List <BatchClientBehavior>()
            {
                interceptor
            };

            // Verify no exceptions when required parameters are set
            cmdlet.ExecuteCmdlet();
        }
        public void NewBatchJobScheduleParametersTest()
        {
            // Setup cmdlet without the required parameters
            BatchAccountContext context = BatchTestHelpers.CreateBatchContextWithKeys();

            cmdlet.BatchContext = context;

            Assert.Throws <ArgumentNullException>(() => cmdlet.ExecuteCmdlet());

            cmdlet.Id = "testJobSchedule";

            // Don't go to the service on an Add CloudJobSchedule call
            RequestInterceptor interceptor = new RequestInterceptor((baseRequest) =>
            {
                BatchRequest <CloudJobScheduleAddParameters, CloudJobScheduleAddResponse> request =
                    (BatchRequest <CloudJobScheduleAddParameters, CloudJobScheduleAddResponse>)baseRequest;

                request.ServiceRequestFunc = (cancellationToken) =>
                {
                    CloudJobScheduleAddResponse response    = new CloudJobScheduleAddResponse();
                    Task <CloudJobScheduleAddResponse> task = Task.FromResult(response);
                    return(task);
                };
            });

            cmdlet.AdditionalBehaviors = new List <BatchClientBehavior>()
            {
                interceptor
            };

            // Verify no exceptions when required parameters are set
            cmdlet.ExecuteCmdlet();
        }