Exemple #1
0
        public void When_PUT_of_new_document_in_batch_mode_The_document_is_replaced()
        {
            var request  = PutDocumentRequest.ForCreate(ClientTestData.Artists.Artist1Id, ClientTestData.Artists.Artist1Json, r => r.Batch = true);
            var response = SUT.PutAsync(request).Result;

            response.Should().BeSuccessfulBatchPutOfNew(ClientTestData.Artists.Artist1Id);
        }
Exemple #2
0
        public void Can_PUT_of_existing_document_in_batch_mode()
        {
            var postResponse = SUT.PostAsync(ClientTestData.Artists.Artist1Json).Result;
            var getResponse  = SUT.GetAsync(postResponse.Id).Result;

            var updateRequest = PutDocumentRequest.ForCreate(getResponse.Id, getResponse.Content, r => r.Batch = true);
            var response      = SUT.PutAsync(updateRequest).Result;

            response.Should().BeSuccessfulBatchPut(ClientTestData.Artists.Artist1Id);
        }
Exemple #3
0
 public virtual Task <DocumentHeaderResponse> PutAsync(string id, string doc)
 {
     return(PutAsync(PutDocumentRequest.ForCreate(id, doc)));
 }
Exemple #4
0
 public virtual Task <DocumentHeaderResponse> PutAsync(string id, string doc, CancellationToken cancellationToken = default)
 {
     return(PutAsync(PutDocumentRequest.ForCreate(id, doc), cancellationToken));
 }