use of org.dotwebstack.framework.core.query.model.FieldRequest in project dotwebstack-framework by dotwebstack.
the class PostgresBackendLoaderTest method initObjectRequest.
private ObjectRequest initObjectRequest() {
PostgresObjectType objectType = mock(PostgresObjectType.class);
when(objectType.getTable()).thenReturn("anyTable");
Map<String, Object> mapValues = Map.of("a", "bbb");
ContextCriteria contextCriteria = mock(ContextCriteria.class);
Context context = mock(Context.class);
when(context.getFields()).thenReturn(Map.of("a", mock(ContextField.class)));
when(contextCriteria.getContext()).thenReturn(context);
when(contextCriteria.getValues()).thenReturn(mapValues);
when(contextCriteria.getName()).thenReturn("Brewery");
Map<FieldRequest, ObjectRequest> objectFields = Map.of();
return ObjectRequest.builder().objectType(objectType).objectFields(objectFields).contextCriteria(contextCriteria).build();
}
use of org.dotwebstack.framework.core.query.model.FieldRequest in project dotwebstack-framework by dotwebstack.
the class QueryTest method initObjectRequest.
private ObjectRequest initObjectRequest() {
PostgresObjectType objectType = mock(PostgresObjectType.class);
when(objectType.getTable()).thenReturn("anyTable");
Map<FieldRequest, ObjectRequest> objectFields = Map.of();
return ObjectRequest.builder().objectType(objectType).objectFields(objectFields).build();
}
Aggregations