@Deprecated @Override public ComponentProperties createProperties() { ComponentProperties compProp = PropertiesImpl.createNewInstance(getPropertiesClass(), "root"); compProp.init(); return compProp; }
@Deprecated @Override public ComponentProperties createProperties() { ComponentProperties compProp = PropertiesImpl.createNewInstance(getPropertiesClass(), "root"); compProp.init(); return compProp; }
/** * check all properties of a component for i18n, check form i18n, check ComponentProperties title is i18n * * @param componentService where to get all the components * @param errorCollector used to collect all errors at once. @see * <a href="http://junit.org/apidocs/org/junit/rules/ErrorCollector.html">ErrorCollector</a> * @deprecated use {@link PropertiesTestUtils#assertAlli18nAreSetup(DefinitionRegistryService, ErrorCollector)} and * {@link #assertReturnProperties18nAreSet(DefinitionRegistryService, ErrorCollector)} */ @Deprecated static public void testAlli18n(ComponentService componentService, ErrorCollector errorCollector) { Set<ComponentDefinition> allComponents = componentService.getAllComponents(); for (ComponentDefinition cd : allComponents) { ComponentProperties props = (ComponentProperties) PropertiesImpl.createNewInstance(cd.getPropertiesClass(), "root") .init(); // check all properties if (props != null) { checkAllI18N(props, errorCollector); } else { System.out.println("No properties to check fo I18n for :" + cd.getName()); } // check component definition title errorCollector.checkThat( "missing I18n property [" + cd.getTitle() + "] for definition [" + cd.getClass().getName() + "]", cd.getTitle().contains("component."), is(false)); // check return properties i18n checkAllPropertyI18n(cd.getReturnProperties(), cd, errorCollector); } }
protected TFileOutputDelimitedProperties createOutputProperties(Object file, boolean isCsvMode) { TFileOutputDelimitedProperties properties = (TFileOutputDelimitedProperties) new TFileOutputDelimitedDefinition() .createProperties().init(); properties.fileName.setValue(file); properties.rowSeparator.setValue("\n"); if (isCsvMode) { properties.csvOptions.setValue(true); properties.escapeChar.setValue("\""); properties.textEnclosure.setValue("\""); } properties.main.schema.setValue(BASIC_OUTPUT_SCHEMA); ComponentTestUtils.checkSerialize(properties, errorCollector); return properties; }
protected TFileInputDelimitedProperties createInputProperties(Object file, boolean isCsvMode) { TFileInputDelimitedProperties properties = (TFileInputDelimitedProperties) new TFileInputDelimitedDefinition() .createProperties().init(); properties.fileName.setValue(file); properties.rowSeparator.setValue("\n"); if (isCsvMode) { properties.csvOptions.setValue(true); properties.escapeChar.setValue("\""); properties.textEnclosure.setValue("\""); } properties.header.setValue(1); properties.main.schema.setValue(BASIC_SCHEMA); ComponentTestUtils.checkSerialize(properties, errorCollector); return properties; }