use of org.talend.components.service.rest.fullexample.datastore.FullExampleDatastoreProperties in project components by Talend.
the class FullExampleComponentTestIT method createDatasetDatastoreSerPropertiesDto.
private SerPropertiesDto createDatasetDatastoreSerPropertiesDto() {
FullExampleDatastoreProperties datastoreProperties = new FullExampleDatastoreProperties("foo");
datastoreProperties.init();
datastoreProperties.tag.setValue("DERBY");
FullExampleDatasetProperties datasetProperties = new FullExampleDatasetProperties("bar");
datasetProperties.init();
datasetProperties.sourceType.setValue(SourceType.SOQL_QUERY);
datasetProperties.moduleName.setValue("Account");
datasetProperties.query.setValue("SELECT * FROM users");
SerPropertiesDto serPropertiesDto = new SerPropertiesDto();
serPropertiesDto.setProperties(datasetProperties.toSerialized());
serPropertiesDto.setDependencies(Collections.singletonList(datastoreProperties.toSerialized()));
return serPropertiesDto;
}
use of org.talend.components.service.rest.fullexample.datastore.FullExampleDatastoreProperties in project components by Talend.
the class FullExampleComponentTestIT method initializeFullExampleDatastoreProperties.
@Test
public void initializeFullExampleDatastoreProperties() throws java.io.IOException {
SerPropertiesDto serProperties = new SerPropertiesDto();
serProperties.setProperties(new FullExampleDatastoreProperties("").init().toSerialized());
//
given().content(serProperties).contentType(ServiceConstants.JSONIO_CONTENT_TYPE).accept(//
ServiceConstants.UI_SPEC_CONTENT_TYPE).expect().statusCode(200).log().ifError().when().post(//
getVersionPrefix() + "/properties/uispec").then().body("jsonSchema", //
notNullValue()).body("properties", //
notNullValue()).body("uiSchema", //
notNullValue()).body("properties.@definitionName", //
equalTo("FullExampleDatastore"));
}
Aggregations