use of com.yahoo.vdslib.Entry in project vespa by vespa-engine.
the class VisitorDataQueueTest method assertResponseHasSinglePut.
private static void assertResponseHasSinglePut(final VisitorResponse response, final DocumentPut expectedInstance) {
assertNonNullDocumentListResponse(response);
final DocumentListVisitorResponse visitorResponse = (DocumentListVisitorResponse) response;
assertThat(visitorResponse.getDocumentList().size(), equalTo(1));
final Entry entry = visitorResponse.getDocumentList().get(0);
assertThat(entry.getDocumentOperation(), is(expectedInstance));
}
use of com.yahoo.vdslib.Entry in project vespa by vespa-engine.
the class VisitorDataQueueTest method assertResponseHasSingleRemove.
private static void assertResponseHasSingleRemove(final VisitorResponse response, final String docId) {
assertNonNullDocumentListResponse(response);
final DocumentListVisitorResponse visitorResponse = (DocumentListVisitorResponse) response;
assertThat(visitorResponse.getDocumentList().size(), equalTo(1));
final Entry entry = visitorResponse.getDocumentList().get(0);
assertThat(entry.isRemoveEntry(), is(true));
assertThat(entry.getDocumentOperation(), instanceOf(DocumentRemove.class));
assertThat(entry.getDocumentOperation().getId(), equalTo(new DocumentId(docId)));
}
Aggregations