Examples of SaveDocumentRequest


Examples of com.bluetangstudio.searchcloud.client.request.SaveDocumentRequest

*/
public class SaveDocumentRequestBuilderTest extends RequestBuilderTestBase {

    @Test
    public void buildHttpUriRequest() {
        SaveDocumentRequest save = new SaveDocumentRequest("SaveDocumentRequestBuilderTest", new Document(1));
        setTrackingVariables(save);

        SaveDocumentRequestBuilder builder = new SaveDocumentRequestBuilder();
        HttpUriRequest httpUriRequest = builder.build(save);
        Assert.assertEquals(httpUriRequest.getClass(), HttpPut.class);
View Full Code Here

Examples of com.bluetangstudio.searchcloud.client.request.SaveDocumentRequest

                mockedHttpResponse.getEntity();
                result = new StringEntity("1");;
            }
        };

        Assert.assertEquals(client.saveDocument(new SaveDocumentRequest(modelId, new Document(10))), 1);
    }
View Full Code Here

Examples of com.bluetangstudio.searchcloud.client.request.SaveDocumentRequest

    }

    /** {@inheritDoc} */
    @Override
    public final int saveDocument(String modelId, T document) throws IOException, ServiceException {
        return saveDocument(new SaveDocumentRequest(modelId, document));
    }
View Full Code Here

Examples of com.bluetangstudio.searchcloud.client.request.SaveDocumentRequest

        String modelId = "test_SaveDocument";

        Document document = new Document(10);
        document.addString("title", "test");
        Integer documentId = client.saveDocument(new SaveDocumentRequest(modelId, document));
        Assert.assertNotNull(documentId);
        Assert.assertEquals(documentId, new Integer(10));

    }
View Full Code Here

Examples of com.bluetangstudio.searchcloud.client.request.SaveDocumentRequest

        RestSearchCloudClient client = new RestSearchCloudClient(new DefaultHttpClientFactory(), getUri(), "apikey");

        String modelId = "test_SaveDocument";
        Document document = new Document();
        document.addString("title", "test");
        Integer documentId = client.saveDocument(new SaveDocumentRequest(modelId, document));
        Assert.assertNotNull(documentId);

    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.