NAME
ETL::Pipeline::Input::UnitTest - Input source for unit tests
SYNOPSIS
use ETL::Pipeline;
ETL::Pipeline->new( {
input => ['UnitTest'],
mapping => {First => 'Header1', Second => 'Header2'},
output => ['UnitTest']
} )->process;
DESCRIPTION
ETL::Pipeline::Input::UnitTest is an input source used by the unit tests. It proves that the ETL::Pipeline::Input role works.
The "data" is hard coded.
METHODS & ATTRIBUTES
current
This array reference holds the current record.
data
The real input source. This is the data returned by "next_record".
Called from "process" in ETL::Pipeline
get
get retrieves one field from the record. Pass an index number as the field name. The test data has 4 header fields and 5 values in each data row. Remember that index numbers start at zero.
next_record
ETL::Pipeline::Input::UnitTest returns 3 records by cycling through "data".
configure
configure doesn't actually do anything. But it is required by "process" in ETL::Pipeline.
finish
finish doesn't actually do anything. But it is required by "process" in ETL::Pipeline.
SEE ALSO
ETL::Pipeline, ETL::Pipeline::Input, ETL::Pipeline::Output::UnitTest
AUTHOR
Robert Wohlfarth <robert.j.wohlfarth@vanderbilt.edu>
LICENSE
Copyright 2016 (c) Vanderbilt University
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.