TLiferayConnectionDefinition extends LiferayDefinition { @Override public RuntimeInfo getRuntimeInfo( ExecutionEngine executionEngine, ComponentProperties componentProperties, ConnectorTopology connectorTopology) { assertConnectorTopologyCompatibility(connectorTopology); assertEngineCompatibility(executionEngine); if (connectorTopology == ConnectorTopology.NONE) { return getCommonRuntimeInfo(SOURCE_OR_SINK_CLASS_NAME); } return null; } TLiferayConnectionDefinition(); @Override Class<? extends ComponentProperties> getPropertyClass(); @Override Property<?>[] getReturnProperties(); @Override RuntimeInfo getRuntimeInfo(
		ExecutionEngine executionEngine,
		ComponentProperties componentProperties,
		ConnectorTopology connectorTopology); @Override Set<ConnectorTopology> getSupportedConnectorTopologies(); @Override boolean isStartable(); static final String COMPONENT_NAME; }
@Test public void testGetRuntimeInfoWrongTopology() { expectedException.expect(TalendRuntimeException.class); expectedException.expectMessage( "WRONG_CONNECTOR:{component=tLiferayConnection}"); _tLiferayConnectionDefinition.getRuntimeInfo( ExecutionEngine.DI, null, ConnectorTopology.INCOMING); }
@Test public void testRuntimeInfo() { RuntimeInfo runtimeInfo = _tLiferayConnectionDefinition.getRuntimeInfo( ExecutionEngine.DI, _tLiferayConnectionProperties, ConnectorTopology.NONE); Assert.assertThat( runtimeInfo, CoreMatchers.instanceOf(JarRuntimeInfo.class)); JarRuntimeInfo jarRuntimeInfo = (JarRuntimeInfo)runtimeInfo; Assert.assertNotNull(jarRuntimeInfo.getDepTxtPath()); Assert.assertNotNull(jarRuntimeInfo.getJarUrl()); Assert.assertEquals( "com.liferay.talend.runtime.LiferaySourceOrSink", jarRuntimeInfo.getRuntimeClassName()); }