aboutsummaryrefslogtreecommitdiff
path: root/t/03-pipeline.t
blob: 009559636bf0aad23ff0486b753ed1aaa7acd4d5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#!/usr/bin/perl 
use strict;
use warnings;
use Path::Class;
use Test::More 'no_plan';
use Test::Exception;
use lib 't/lib';
use WebCoso::Config;
use WebCoso::Driver;
use WebCoso::Pipeline::Test;
 
my $thisdir=file($0)->parent->absolute;
 
my $conf_file=<<'EOF';
res('src/file1.rest.txt','Test','dst/file.html');
EOF
 
WebCoso::Config->read_scalar($conf_file,"$thisdir/config-in-test");
 
WebCoso::Driver->run();
 
my @resources=WebCoso::Config->get_all_resources();
 
my @calls1=WebCoso::Step::Step1->get_calls();
is(scalar @calls1,1,"1 chiamata a Step1");
is($calls1[0]->{resource},
   $resources[0],
   'risorsa giusta passata a Step1');
 
my @calls2=WebCoso::Step::Step2->get_calls();
is(scalar @calls2,1,"1 chiamata a Step2");
is($calls2[0]->{resource},
   $calls1[0]->{out_res},
   'risorsa giusta passata a Step2');