Package com.bluetangstudio.searchcloud.client.request

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


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

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

    }

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

        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

        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

Related Classes of com.bluetangstudio.searchcloud.client.request.SaveDocumentRequest

Copyright © 2018 www.massapicom. 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.