src/SFBulkAPIStarterTest/TestBulkApiClient.cs
/// <summary>
/// Tests getting a batch's detail after an account batch is created.
/// </summary>
Tests getting a batch's detail after an account batch is created.
Tests getting a batch ' s detail after an account batch is created .
[TestMethod]
        public void GetBatchTest()
        {
            CreateJobRequest insertAccountJobRequest = buildDefaultInsertAccountCreateJobRequest();
            Job insertAccountJob = _apiClient.CreateJob(insertAccountJobRequest);
            String batchContents = buildDefaultAccountBatchContents();
            CreateBatchRequest batchRequest = buildCreateBatchRequest(insertAccountJob.Id, batchContents);
            Batch accountBatch = _apiClient.CreateBatch(batchRequest);
            Assert.IsTrue(String.IsNullOrWhiteSpace(accountBatch.JobId) == false);
            Assert.IsTrue(String.IsNullOrWhiteSpace(accountBatch.Id) == false);
            Batch batch = _apiClient.GetBatch(accountBatch.JobId, accountBatch.Id);
            Assert.AreEqual(accountBatch.JobId, batch.JobId);
            Assert.AreEqual(accountBatch.Id, batch.Id);
        }
[ TestMethod ] public void GetBatchTest ( ) { CreateJobRequest insertAccountJobRequest = buildDefaultInsertAccountCreateJobRequest ( ) ; Job insertAccountJob = _apiClient . CreateJob ( insertAccountJobRequest ) ; String batchContents = buildDefaultAccountBatchContents ( ) ; CreateBatchRequest batchRequest = buildCreateBatchRequest ( insertAccountJob . Id , batchContents ) ; Batch accountBatch = _apiClient . CreateBatch ( batchRequest ) ; Assert . IsTrue ( String . IsNullOrWhiteSpace ( accountBatch . JobId ) == false ) ; Assert . IsTrue ( String . IsNullOrWhiteSpace ( accountBatch . Id ) == false ) ; Batch batch = _apiClient . GetBatch ( accountBatch . JobId , accountBatch . Id ) ; Assert . AreEqual ( accountBatch . JobId , batch . JobId ) ; Assert . AreEqual ( accountBatch . Id , batch . Id ) ; }
Tests getting a batch's detail after an account batch is created.
Tests getting a batch ' s detail after an account batch is created .