SADI::Service::UnitTest - A module that encapsulates unit test information for sadi services.
use SADI::Service::UnitTest; # create a new blank SADI UnitTest object my $data = SADI::Service::UnitTest->new (); # create a new primed SADI UnitTest object $data = SADI::Service::UnitTest->new ( regex => '(\w+)+', xpath => '/xml/text()', input => '<xml/>', output => '<xml/>', ); # get the unit test regex my $regex = $data->regex; # set the regex statement for this test $data->regex($regex); # get the unit test xpath statement my $xpath = $data->xpath; # set the xpath statement for this test $data->regex($xpath); # get input for this test my $input = $data->input; # set the input for this test $data->input($input); # get expected output for this test my $output = $data->output; # set the expected output for this test $data->output($output);
An object representing a SADI service unit test.
Edward Kawas (edward.kawas [at] gmail [dot] com)
Details are in SADI::Base. Here just a list of them (additionally to the attributes from the parent classes)
The input for this unit test. Input is required, because without it, there can be no test
The expected output of this service given the specified input.
A regular expression that should match the output of the service given the specified input.
An xpath expression that should yield return results given the specified input.
To install SADI, copy and paste the appropriate command in to your terminal.
cpanm
cpanm SADI
CPAN shell
perl -MCPAN -e shell install SADI
For more information on module installation, please visit the detailed CPAN module installation guide.