use of org.talend.designer.core.generic.utils.TestReferencedProperties in project tdi-studio-se by Talend.
the class ComponentTest method testGetCodegenPropInfosWithReferencePropertiesObject.
@Test
public void testGetCodegenPropInfosWithReferencePropertiesObject() {
//$NON-NLS-1$
TestProperties props = (TestProperties) new TestProperties("test").init();
props.referencePros.setReference(new TestReferencedProperties("reference").init());
List<CodegenPropInfo> propInfos = component.getCodegenPropInfos(props);
for (CodegenPropInfo propInfo : propInfos) {
Properties properties = propInfo.props;
if (properties instanceof ComponentReferenceProperties) {
ComponentReferenceProperties crp = (ComponentReferenceProperties) properties;
assertEquals(Boolean.TRUE, crp.componentInstanceId.getTaggedValue(IGenericConstants.ADD_QUOTES));
assertEquals(Boolean.TRUE, crp.referenceDefinitionName.getTaggedValue(IGenericConstants.ADD_QUOTES));
assertNotNull(crp.getReference());
}
}
}
Aggregations