Search in sources :

Example 1 with TestInjectComponentProperties

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

the class DefintitionRegistryTest method testCreateNewPropertiesWithInjected.

@Test
public void testCreateNewPropertiesWithInjected() {
    DefinitionRegistryService registry = new DefinitionRegistry();
    TestInjectComponentDefinition def = new TestInjectComponentDefinition();
    TestInjectComponentProperties testProps = (TestInjectComponentProperties) registry.createProperties(def, "testProps");
    assertThat(testProps.getDefinitionRegistry(), equalTo(registry));
}
Also used : TestInjectComponentDefinition(org.talend.components.api.service.common.testcomponent.inject.TestInjectComponentDefinition) DefinitionRegistryService(org.talend.daikon.definition.service.DefinitionRegistryService) TestInjectComponentProperties(org.talend.components.api.service.common.testcomponent.inject.TestInjectComponentProperties) Test(org.junit.Test)

Example 2 with TestInjectComponentProperties

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

the class DefintitionRegistryTest method testInjectDefinitionRegistry.

@Test
public void testInjectDefinitionRegistry() {
    DefinitionRegistry registry = new DefinitionRegistry();
    TestInjectComponentProperties properties = new TestInjectComponentProperties("props");
    registry.injectDefinitionRegistry(properties);
    assertThat((DefinitionRegistry) properties.getDefinitionRegistry(), equalTo(registry));
}
Also used : TestInjectComponentProperties(org.talend.components.api.service.common.testcomponent.inject.TestInjectComponentProperties) Test(org.junit.Test)

Aggregations

Test (org.junit.Test)2 TestInjectComponentProperties (org.talend.components.api.service.common.testcomponent.inject.TestInjectComponentProperties)2 TestInjectComponentDefinition (org.talend.components.api.service.common.testcomponent.inject.TestInjectComponentDefinition)1 DefinitionRegistryService (org.talend.daikon.definition.service.DefinitionRegistryService)1