public void testSetupLayout() { TJiraOutputProperties properties = new TJiraOutputProperties("root"); properties.schema.init(); properties.connection.init();
public void testSetupLayout() { TJiraInputProperties properties = new TJiraInputProperties("root"); properties.schema.init(); properties.connection.init();
@Test public void testWithInit() { // basic element SchemaProperties schemaProperties = new SchemaProperties("testSchema"); assertEquals("testSchema", schemaProperties.getName()); assertEquals(0, schemaProperties.getForms().size()); // init schemaProperties.init(); assertEquals("schema", schemaProperties.schema.getName()); assertNotNull(schemaProperties.schema.getValue()); assertThat(schemaProperties.schema.getValue(), instanceOf(Schema.class)); // check the automatic getLayer assertEquals(2, schemaProperties.getForms().size()); assertNotNull(schemaProperties.getForm(Form.MAIN)); assertNotNull("Schema", schemaProperties.getForm(Form.MAIN).getName()); assertNotNull(schemaProperties.getForm(Form.MAIN).getWidget(schemaProperties.schema.getName())); assertEquals(1, schemaProperties.getForm(Form.MAIN).getWidget(schemaProperties.schema.getName()).getRow()); assertEquals(Widget.SCHEMA_EDITOR_WIDGET_TYPE, schemaProperties.getForm(Form.MAIN).getWidget(schemaProperties.schema.getName()).getWidgetType()); assertNotNull(schemaProperties.getForm(Form.REFERENCE)); assertNotNull("Schema", schemaProperties.getForm(Form.REFERENCE).getName()); assertNotNull(schemaProperties.getForm(Form.REFERENCE).getWidget(schemaProperties.schema.getName())); assertEquals(1, schemaProperties.getForm(Form.REFERENCE).getWidget(schemaProperties.schema.getName()).getRow()); assertEquals(Widget.SCHEMA_REFERENCE_WIDGET_TYPE, schemaProperties.getForm(Form.REFERENCE).getWidget(schemaProperties.schema.getName()).getWidgetType()); // add element Schema schema = new Schema.Parser().parse(schemaProperties.schema.getStringValue()); assertThat(schema, not(nullValue())); }
@Test public void testAlli18n() { ComponentTestUtils.checkAllI18N(new BulkFileProperties(null).init(), errorCollector); ComponentTestUtils.checkAllI18N(new FixedConnectorsComponentProperties(null) { @Override protected Set<PropertyPathConnector> getAllSchemaPropertiesConnectors(boolean isOutputConnection) { // TODO Auto-generated method stub return null; } }.init(), errorCollector); ComponentTestUtils.checkAllI18N(new ProxyProperties(null).init(), errorCollector); ComponentTestUtils.checkAllI18N(new SchemaProperties(null).init(), errorCollector); ComponentTestUtils.checkAllI18N(new UserPasswordProperties(null).init(), errorCollector); ComponentTestUtils.checkAllI18N(new SslProperties(null).init(), errorCollector); }