use of org.kie.server.api.util.ProcessInstanceQueryFilterSpecBuilder in project droolsjbpm-integration by kiegroup.
the class MarshallerHelperTest method testJsonUnmarshallProcessInstanceQueryFilterSpec.
@Test
public void testJsonUnmarshallProcessInstanceQueryFilterSpec() {
ProcessInstanceQueryFilterSpec expectedPiQfs = new ProcessInstanceQueryFilterSpecBuilder().get();
MarshallerHelper helper = new MarshallerHelper(null);
String marshalledQFS = "{\"order-by\" : null,\"order-asc\" : false,\"query-params\" : null}";
ProcessInstanceQueryFilterSpec unmarshalledPiQfs = helper.unmarshal(marshalledQFS, MarshallingFormat.JSON.toString(), ProcessInstanceQueryFilterSpec.class);
assertThat(expectedPiQfs, new BaseMatcher<QueryFilterSpec>() {
@Override
public void describeTo(Description description) {
}
@Override
public boolean matches(Object item) {
return new ReflectionEquals(unmarshalledPiQfs).matches(item);
}
});
}
use of org.kie.server.api.util.ProcessInstanceQueryFilterSpecBuilder in project droolsjbpm-integration by kiegroup.
the class ProcessSearchServiceIntegrationTest method createQueryFilterAndEqualsTo.
private ProcessInstanceQueryFilterSpec createQueryFilterAndEqualsTo(Map<ProcessInstanceField, Comparable<?>> filterProperties) {
ProcessInstanceQueryFilterSpecBuilder result = new ProcessInstanceQueryFilterSpecBuilder();
filterProperties.forEach(result::equalsTo);
return result.get();
}
Aggregations