Search in sources :

Example 1 with TestComponentWizard

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

the class ComponentServiceTest method testGetWizard.

@Test
public void testGetWizard() {
    ComponentWizard wizard = getComponentService().getComponentWizard(TestComponentWizardDefinition.COMPONENT_WIZARD_NAME, "userdata");
    assertTrue(wizard instanceof TestComponentWizard);
    assertEquals("userdata", wizard.getRepositoryLocation());
}
Also used : TestComponentWizard(org.talend.components.api.service.common.testcomponent.TestComponentWizard) ComponentWizard(org.talend.components.api.wizard.ComponentWizard) TestComponentWizard(org.talend.components.api.service.common.testcomponent.TestComponentWizard) Test(org.junit.Test) AbstractComponentTest(org.talend.components.api.test.AbstractComponentTest)

Example 2 with TestComponentWizard

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

the class ComponentServiceTest method testGetWizardWithProps.

@Test
public void testGetWizardWithProps() {
    TestComponentWizard wizard = (TestComponentWizard) getComponentService().getComponentWizard(TestComponentWizardDefinition.COMPONENT_WIZARD_NAME, "userdata");
    wizard.props = new TestComponentProperties("props").init();
    ComponentProperties props = (ComponentProperties) wizard.props;
    List<ComponentWizard> wizards = getComponentService().getComponentWizardsForProperties(props, "userdata");
    assertTrue(props == ((TestComponentWizard) wizards.get(0)).props);
}
Also used : 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) TestComponentWizard(org.talend.components.api.service.common.testcomponent.TestComponentWizard) ComponentWizard(org.talend.components.api.wizard.ComponentWizard) TestComponentProperties(org.talend.components.api.service.common.testcomponent.TestComponentProperties) TestComponentWizard(org.talend.components.api.service.common.testcomponent.TestComponentWizard) Test(org.junit.Test) AbstractComponentTest(org.talend.components.api.test.AbstractComponentTest)

Aggregations

Test (org.junit.Test)2 TestComponentWizard (org.talend.components.api.service.common.testcomponent.TestComponentWizard)2 AbstractComponentTest (org.talend.components.api.test.AbstractComponentTest)2 ComponentWizard (org.talend.components.api.wizard.ComponentWizard)2 ComponentProperties (org.talend.components.api.properties.ComponentProperties)1 TestComponentProperties (org.talend.components.api.service.common.testcomponent.TestComponentProperties)1 NestedComponentProperties (org.talend.components.api.service.common.testcomponent.nestedprop.NestedComponentProperties)1