src/SFBulkAPIStarterTest/TestBulkApiClient.cs
/// <summary>
/// Tests getting the batches in a job.
/// </summary>
Tests getting the batches in a job.
Tests getting the batches in a job .
[TestMethod]
        public void GetJobBatchesTest()
        {
            CreateJobRequest insertAccountJobRequest = buildDefaultInsertAccountCreateJobRequest();
            Job insertAccountJob = _apiClient.CreateJob(insertAccountJobRequest);
            String batchContents = buildDefaultAccountBatchContents();
            CreateBatchRequest batchRequest = buildCreateBatchRequest(insertAccountJob.Id, batchContents);
            Batch accountBatch = _apiClient.CreateBatch(batchRequest);
            String batchContents2 = buildDefaultAccountBatchContents("Test Name2");
            CreateBatchRequest batchRequest2 = buildCreateBatchRequest(insertAccountJob.Id, batchContents2);
            Batch accountBatch2 = _apiClient.CreateBatch(batchRequest2);
            List<Batch> batches = _apiClient.GetBatches(insertAccountJob.Id);
            Assert.AreEqual(2, batches.Count);
        }
[ TestMethod ] public void GetJobBatchesTest ( ) { CreateJobRequest insertAccountJobRequest = buildDefaultInsertAccountCreateJobRequest ( ) ; Job insertAccountJob = _apiClient . CreateJob ( insertAccountJobRequest ) ; String batchContents = buildDefaultAccountBatchContents ( ) ; CreateBatchRequest batchRequest = buildCreateBatchRequest ( insertAccountJob . Id , batchContents ) ; Batch accountBatch = _apiClient . CreateBatch ( batchRequest ) ; String batchContents2 = buildDefaultAccountBatchContents ( " " ) ; CreateBatchRequest batchRequest2 = buildCreateBatchRequest ( insertAccountJob . Id , batchContents2 ) ; Batch accountBatch2 = _apiClient . CreateBatch ( batchRequest2 ) ; List < Batch > batches = _apiClient . GetBatches ( insertAccountJob . Id ) ; Assert . AreEqual ( 2 , batches . Count ) ; }
Tests getting the batches in a job.
Tests getting the batches in a job .