use of org.infinispan.protostream.sampledomain.User in project camel-spring-boot by apache.
the class InfinispanRemoteQueryProducerIT method producerQueryWithoutResult.
private void producerQueryWithoutResult(String endpoint, final InfinispanQueryBuilder builder) {
Exchange request = template.request(endpoint, createQueryProcessor(builder));
assertNull(request.getException());
List<User> queryResult = request.getIn().getBody(List.class);
assertNotNull(queryResult);
assertEquals(0, queryResult.size());
}
use of org.infinispan.protostream.sampledomain.User in project camel-spring-boot by apache.
the class InfinispanRemoteQueryProducerIT method producerQueryWithResult.
private void producerQueryWithResult(String endpoint, final InfinispanQueryBuilder builder) {
Exchange request = template.request(endpoint, createQueryProcessor(builder));
assertNull(request.getException());
List<User> queryResult = request.getIn().getBody(List.class);
assertNotNull(queryResult);
assertEquals(2, queryResult.size());
assertTrue(hasUser(queryResult, "nameA", "surnameA"));
assertTrue(hasUser(queryResult, "nameA", "surnameB"));
}
use of org.infinispan.protostream.sampledomain.User in project camel-spring-boot by apache.
the class InfinispanRemoteQueryTestSupport method createUser.
public static User createUser(String name, String surname) {
User user = new User();
user.setName(name);
user.setSurname(surname);
return user;
}
use of org.infinispan.protostream.sampledomain.User in project camel by apache.
the class InfinispanRemoteQueryProducerIT method producerQueryOperationWithoutQueryBuilder.
@Test
public void producerQueryOperationWithoutQueryBuilder() throws Exception {
Exchange request = template.request("direct:start", new Processor() {
@Override
public void process(Exchange exchange) throws Exception {
exchange.getIn().setHeader(OPERATION, QUERY);
}
});
assertNull(request.getException());
List<User> queryResult = request.getIn().getHeader(RESULT, List.class);
assertNull(queryResult);
}
use of org.infinispan.protostream.sampledomain.User in project camel by apache.
the class InfinispanRemoteQueryProducerIT method producerQueryWithoutResult.
private void producerQueryWithoutResult(String endpoint, final InfinispanQueryBuilder builder) throws Exception {
Exchange request = template.request(endpoint, createQueryProcessor(builder));
assertNull(request.getException());
List<User> queryResult = request.getIn().getHeader(RESULT, List.class);
assertNotNull(queryResult);
assertEquals(0, queryResult.size());
}
Aggregations