aboutsummaryrefslogtreecommitdiff
path: root/t/lib
diff options
context:
space:
mode:
authordakkar <dakkar@luxion>2005-11-07 12:10:45 +0000
committerdakkar <dakkar@luxion>2005-11-07 12:10:45 +0000
commit39cd8c52774be37226a3015c7c13d5b42a68d95e (patch)
tree525a6cf657151a1a41f6e555e9dd30a28d5a48b6 /t/lib
parentmigliorate le eccezioni, scritto Driver con test. Re #1 (diff)
downloadWebCoso-39cd8c52774be37226a3015c7c13d5b42a68d95e.tar.gz
WebCoso-39cd8c52774be37226a3015c7c13d5b42a68d95e.tar.bz2
WebCoso-39cd8c52774be37226a3015c7c13d5b42a68d95e.zip
aggiunta struttura base pipeline, e test, re #2
git-svn-id: svn://luxion/repos/WebCoso/trunk@23 fcb26f47-9200-0410-b104-b98ab5b095f3
Diffstat (limited to 't/lib')
-rw-r--r--t/lib/WebCoso/Pipeline/Test.pm13
-rw-r--r--t/lib/WebCoso/Step/Step1.pm24
-rw-r--r--t/lib/WebCoso/Step/Step2.pm24
3 files changed, 59 insertions, 2 deletions
diff --git a/t/lib/WebCoso/Pipeline/Test.pm b/t/lib/WebCoso/Pipeline/Test.pm
index 239d74b..6920f46 100644
--- a/t/lib/WebCoso/Pipeline/Test.pm
+++ b/t/lib/WebCoso/Pipeline/Test.pm
@@ -1,13 +1,22 @@
package WebCoso::Pipeline::Test;
use strict;
use warnings;
+use base 'WebCoso::Pipeline::Base';
+
+__PACKAGE__->set_steps(qw(Step1 Step2));
my @calls;
sub process {
my ($class,$resource)=@_;
- push @calls, { resource => $resource };
- return 1;
+
+ my $call={ resource => $resource };
+
+ my $ret=$class->SUPER::process($resource);
+
+ push @calls, $call;
+
+ return $ret;
}
sub get_calls {
diff --git a/t/lib/WebCoso/Step/Step1.pm b/t/lib/WebCoso/Step/Step1.pm
new file mode 100644
index 0000000..8a36d1d
--- /dev/null
+++ b/t/lib/WebCoso/Step/Step1.pm
@@ -0,0 +1,24 @@
+package WebCoso::Step::Step1;
+use strict;
+use warnings;
+
+my @calls;
+
+sub process {
+ my ($class,$resource)=@_;
+
+ my $out='stuff';
+
+ push @calls,{
+ resource => $resource,
+ out_res => $out,
+ };
+
+ return $out;
+}
+
+sub get_calls {
+ return @calls;
+}
+
+1;
diff --git a/t/lib/WebCoso/Step/Step2.pm b/t/lib/WebCoso/Step/Step2.pm
new file mode 100644
index 0000000..0868842
--- /dev/null
+++ b/t/lib/WebCoso/Step/Step2.pm
@@ -0,0 +1,24 @@
+package WebCoso::Step::Step2;
+use strict;
+use warnings;
+
+my @calls;
+
+sub process {
+ my ($class,$resource)=@_;
+
+ my $out='other';
+
+ push @calls,{
+ resource => $resource,
+ out_res => $out,
+ };
+
+ return $out;
+}
+
+sub get_calls {
+ return @calls;
+}
+
+1;