@Override public <T> DataModelSource createSource( DataModelDefinition<T> definition, TestContext context) throws IOException { return DataModelSourceFilter.this.apply(factory.createSource(definition, context)); } };
/** * Sets the test data set for this input. * @param factory factory which provides test data set * @param transformer the input source transformer * @return this * @since 0.10.2 */ public S prepare(DataModelSourceFactory factory, Consumer<? super T> transformer) { if (factory == null) { throw new IllegalArgumentException("factory must not be null"); //$NON-NLS-1$ } LOG.debug("prepare - ModelType: {}", getModelType()); //$NON-NLS-1$ if (transformer == null) { setSource(factory); } else { DataModelSourceFilter filter = toDataModelSourceFilter(transformer); setSource(filter.apply(factory)); } return getThis(); }
/** * Sets the test data set for this output. * @param factory factory which provides test data set * @param transformer the input source transformer * @return this * @since 0.10.2 */ public S prepare(DataModelSourceFactory factory, Consumer<? super T> transformer) { if (factory == null) { throw new IllegalArgumentException("factory must not be null"); //$NON-NLS-1$ } LOG.debug("prepare - ModelType: {}", getModelType()); //$NON-NLS-1$ if (transformer == null) { setSource(factory); } else { DataModelSourceFilter filter = toDataModelSourceFilter(transformer); setSource(filter.apply(factory)); } return getThis(); }