line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
1
|
|
|
1
|
|
5969
|
use 5.008; |
|
1
|
|
|
|
|
4
|
|
|
1
|
|
|
|
|
34
|
|
2
|
1
|
|
|
1
|
|
7
|
use strict; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
32
|
|
3
|
1
|
|
|
1
|
|
6
|
use warnings; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
53
|
|
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
package Data::Conveyor::Ticket::Payload::Common_TEST; |
6
|
|
|
|
|
|
|
BEGIN { |
7
|
1
|
|
|
1
|
|
15
|
$Data::Conveyor::Ticket::Payload::Common_TEST::VERSION = '1.103130'; |
8
|
|
|
|
|
|
|
} |
9
|
|
|
|
|
|
|
# ABSTRACT: Stage-based conveyor-belt-like ticket handling system |
10
|
|
|
|
|
|
|
|
11
|
1
|
|
|
1
|
|
5
|
use Test::More; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
10
|
|
12
|
1
|
|
|
1
|
|
297
|
use parent 'Data::Conveyor::Test'; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
7
|
|
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
sub PLAN { |
15
|
1
|
|
|
1
|
1
|
1054
|
my $self = shift; |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
# $::delegate->TS and ->RC in numeric context return the arrayref |
18
|
1
|
|
|
|
|
8
|
$::delegate->TS_COUNT + $::delegate->RC_COUNT + 4; |
19
|
|
|
|
|
|
|
} |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
sub run { |
22
|
1
|
|
|
1
|
1
|
2522
|
my $self = shift; |
23
|
1
|
|
|
|
|
11
|
$self->SUPER::run(@_); |
24
|
1
|
|
|
|
|
689
|
my $obj = $self->make_real_object; |
25
|
1
|
|
|
|
|
1355
|
$self->obj_ok($obj->default_rc, 'value_ticket_rc'); |
26
|
1
|
|
|
|
|
773
|
$self->obj_ok($obj->default_status, 'value_ticket_status'); |
27
|
1
|
|
|
|
|
1034
|
my $ticket = $self->delegate->make_obj('ticket'); |
28
|
1
|
|
|
|
|
3750
|
is($obj->rc($ticket), $self->delegate->RC_OK, |
29
|
|
|
|
|
|
|
'rc without exceptions is RC_OK'); |
30
|
1
|
|
|
|
|
640
|
is( $obj->status($ticket), |
31
|
|
|
|
|
|
|
$self->delegate->TS_RUNNING, |
32
|
|
|
|
|
|
|
'status without exceptions is TS_RUNNING' |
33
|
|
|
|
|
|
|
); |
34
|
|
|
|
|
|
|
|
35
|
1
|
|
|
|
|
436
|
for my $rc (sort $self->delegate->RC) { |
36
|
4
|
|
|
|
|
1138
|
$obj->default_rc($rc); |
37
|
4
|
|
|
|
|
474
|
is($obj->rc($ticket), $rc, "effect of default [$rc] on rc"); |
38
|
|
|
|
|
|
|
} |
39
|
1
|
|
|
|
|
359
|
for my $status (sort $self->delegate->TS) { |
40
|
5
|
|
|
|
|
1728
|
$obj->default_status($status); |
41
|
5
|
|
|
|
|
592
|
is($obj->status($ticket), $status, |
42
|
|
|
|
|
|
|
"effect of default [$status] on status"); |
43
|
|
|
|
|
|
|
} |
44
|
|
|
|
|
|
|
} |
45
|
|
|
|
|
|
|
1; |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
__END__ |