TLiferayInputDefinition extends LiferayDefinition { @Override public RuntimeInfo getRuntimeInfo( ExecutionEngine executionEngine, ComponentProperties componentProperties, ConnectorTopology connectorTopology) { if (connectorTopology != ConnectorTopology.OUTGOING) { TalendRuntimeException.TalendRuntimeExceptionBuilder builder = new TalendRuntimeException.TalendRuntimeExceptionBuilder( ComponentsErrorCode.WRONG_CONNECTOR, new IllegalArgumentException()); builder.put("component", COMPONENT_NAME); throw builder.create(); } assertEngineCompatibility(executionEngine); return getCommonRuntimeInfo(SOURCE_CLASS_NAME); } TLiferayInputDefinition(); @Override Class<? extends ComponentProperties>[] getNestedCompatibleComponentPropertiesClass(); @Override Class<? extends ComponentProperties> getPropertyClass(); 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 testGetRuntimeInfoForOutgoingTopology() { RuntimeInfo runtimeInfo = _tLiferayInputDefinition.getRuntimeInfo( ExecutionEngine.DI, null, ConnectorTopology.OUTGOING); assertThat( runtimeInfo.getRuntimeClassName(), equalTo("com.liferay.talend.runtime.LiferaySource")); }
@Test public void testGetRuntimeInfoWrongEngine() { expectedException.expect(TalendRuntimeException.class); expectedException.expectMessage( "WRONG_EXECUTION_ENGINE:{component=tLiferayInput, " + "requested=DI_SPARK_STREAMING, available=[DI]}"); _tLiferayInputDefinition.getRuntimeInfo( ExecutionEngine.DI_SPARK_STREAMING, null, ConnectorTopology.OUTGOING); }
@Test public void testGetRuntimeInfoWrongTopology() { expectedException.expect(TalendRuntimeException.class); expectedException.expectMessage( "WRONG_CONNECTOR:{component=tLiferayInput}"); _tLiferayInputDefinition.getRuntimeInfo( ExecutionEngine.DI, null, ConnectorTopology.INCOMING); }