use of com.bakdata.conquery.apiv1.forms.export_form.AbsoluteMode in project conquery by bakdata.
the class SerializationTests method formConfig.
@Test
public void formConfig() throws JSONException, IOException {
final CentralRegistry registry = new CentralRegistry();
final Dataset dataset = new Dataset("test-dataset");
registry.register(dataset);
ExportForm form = new ExportForm();
AbsoluteMode mode = new AbsoluteMode();
form.setTimeMode(mode);
mode.setForm(form);
mode.setFeatures(List.of(new CQConcept()));
ObjectMapper mapper = FormConfigProcessor.getMAPPER();
JsonNode values = mapper.valueToTree(form);
FormConfig formConfig = new FormConfig(form.getClass().getAnnotation(CPSType.class).id(), values);
formConfig.setDataset(dataset);
SerializationTestUtil.forType(FormConfig.class).registry(registry).test(formConfig);
}
use of com.bakdata.conquery.apiv1.forms.export_form.AbsoluteMode in project conquery by bakdata.
the class FormConfigTest method setupTest.
@BeforeEach
public void setupTest() {
final ManagedQuery managedQuery = new ManagedQuery(null, null, dataset);
managedQuery.setQueryId(UUID.randomUUID());
form = new ExportForm();
AbsoluteMode mode = new AbsoluteMode();
form.setTimeMode(mode);
form.setQueryGroupId(managedQuery.getId());
mode.setForm(form);
mode.setFeatures(List.of(new CQConcept()));
user = new User("test", "test", storage);
storage.addUser(user);
}
Aggregations