@Test public void testGetOutputResourceFields() throws Exception { XMLField[] outputFields = new XMLField[2]; XMLField field1 = mock( XMLField.class ); XMLField field2 = mock( XMLField.class ); outputFields[0] = field1; outputFields[1] = field2; when( field1.getFieldName() ).thenReturn( "field1" ); when( field2.getFieldName() ).thenReturn( "field2" ); when( meta.getOutputFields() ).thenReturn( outputFields ); Set<String> outputResourceFields = analyzer.getOutputResourceFields( meta ); assertEquals( outputFields.length, outputResourceFields.size() ); for ( XMLField outputField : outputFields ) { assertTrue( outputResourceFields.contains( outputField.getFieldName() ) ); } }
@Override public Set<String> getOutputResourceFields( XMLOutputMeta meta ) { Set<String> fields = new HashSet<>(); XMLField[] outputFields = meta.getOutputFields(); for ( int i = 0; i < outputFields.length; i++ ) { XMLField outputField = outputFields[ i ]; fields.add( outputField.getFieldName() ); } return fields; }
XMLOutputStepAnalyzer extends ExternalResourceStepAnalyzer<XMLOutputMeta> { @Override public Set<String> getOutputResourceFields( XMLOutputMeta meta ) { Set<String> fields = new HashSet<>(); XMLField[] outputFields = meta.getOutputFields(); for ( int i = 0; i < outputFields.length; i++ ) { XMLField outputField = outputFields[ i ]; fields.add( outputField.getFieldName() ); } return fields; } }
XMLOutputStepAnalyzer extends ExternalResourceStepAnalyzer<XMLOutputMeta> { @Override public Set<String> getOutputResourceFields( XMLOutputMeta meta ) { Set<String> fields = new HashSet<>(); XMLField[] outputFields = meta.getOutputFields(); for ( int i = 0; i < outputFields.length; i++ ) { XMLField outputField = outputFields[ i ]; fields.add( outputField.getFieldName() ); } return fields; }  }
XMLOutputStepAnalyzer extends ExternalResourceStepAnalyzer<XMLOutputMeta> { @Override public Set<String> getOutputResourceFields( XMLOutputMeta meta ) { Set<String> fields = new HashSet<>(); XMLField[] outputFields = meta.getOutputFields(); for ( int i = 0; i < outputFields.length; i++ ) { XMLField outputField = outputFields[ i ]; fields.add( outputField.getFieldName() ); } return fields; }  @Override Set<Class<? extends BaseStepMeta>> getSupportedSteps(); @Override IMetaverseNode createResourceNode( IExternalResourceInfo resource ); @Override String getResourceInputNodeType(); @Override String getResourceOutputNodeType(); @Override boolean isOutput(); @Override boolean isInput(); @Override Set<String> getOutputResourceFields( XMLOutputMeta meta ); }
XMLOutputStepAnalyzer extends ExternalResourceStepAnalyzer<XMLOutputMeta> { @Override public Set<String> getOutputResourceFields( XMLOutputMeta meta ) { Set<String> fields = new HashSet<>(); XMLField[] outputFields = meta.getOutputFields(); for ( int i = 0; i < outputFields.length; i++ ) { XMLField outputField = outputFields[ i ]; fields.add( outputField.getFieldName() ); } return fields; }  @Override Set<Class<? extends BaseStepMeta>> getSupportedSteps(); @Override IMetaverseNode createResourceNode( IExternalResourceInfo resource ); @Override String getResourceInputNodeType(); @Override String getResourceOutputNodeType(); @Override boolean isOutput(); @Override boolean isInput(); @Override Set<String> getOutputResourceFields( XMLOutputMeta meta );  }