Search in sources :

Example 1 with NestedComponentProperties

use of org.talend.components.api.service.common.testcomponent.nestedprop.NestedComponentProperties in project components by Talend.

the class ComponentServiceTest method testSupportsProps.

@Test
public void testSupportsProps() throws Throwable {
    ComponentProperties props = getComponentService().getComponentProperties(TestComponentDefinition.COMPONENT_NAME);
    ComponentPropertiesWithDefinedI18N anotherProp = (ComponentPropertiesWithDefinedI18N) new ComponentPropertiesWithDefinedI18N("foo").init();
    List<ComponentDefinition> comps = getComponentService().getPossibleComponents(props, anotherProp);
    assertEquals("TestComponent", comps.get(0).getName());
    comps = getComponentService().getPossibleComponents(new NestedComponentProperties("props"), new NotExistingComponentProperties());
    assertEquals(0, comps.size());
}
Also used : NestedComponentProperties(org.talend.components.api.service.common.testcomponent.nestedprop.NestedComponentProperties) NestedComponentProperties(org.talend.components.api.service.common.testcomponent.nestedprop.NestedComponentProperties) TestComponentProperties(org.talend.components.api.service.common.testcomponent.TestComponentProperties) ComponentProperties(org.talend.components.api.properties.ComponentProperties) ComponentPropertiesWithDefinedI18N(org.talend.components.api.service.common.testcomponent.ComponentPropertiesWithDefinedI18N) TestComponentDefinition(org.talend.components.api.service.common.testcomponent.TestComponentDefinition) ComponentDefinition(org.talend.components.api.component.ComponentDefinition) Test(org.junit.Test) AbstractComponentTest(org.talend.components.api.test.AbstractComponentTest)

Aggregations

Test (org.junit.Test)1 ComponentDefinition (org.talend.components.api.component.ComponentDefinition)1 ComponentProperties (org.talend.components.api.properties.ComponentProperties)1 ComponentPropertiesWithDefinedI18N (org.talend.components.api.service.common.testcomponent.ComponentPropertiesWithDefinedI18N)1 TestComponentDefinition (org.talend.components.api.service.common.testcomponent.TestComponentDefinition)1 TestComponentProperties (org.talend.components.api.service.common.testcomponent.TestComponentProperties)1 NestedComponentProperties (org.talend.components.api.service.common.testcomponent.nestedprop.NestedComponentProperties)1 AbstractComponentTest (org.talend.components.api.test.AbstractComponentTest)1