line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Test::BDD::Cucumber::Model::Step; |
2
|
|
|
|
|
|
|
$Test::BDD::Cucumber::Model::Step::VERSION = '0.84'; |
3
|
18
|
|
|
18
|
|
133
|
use Moo; |
|
18
|
|
|
|
|
44
|
|
|
18
|
|
|
|
|
123
|
|
4
|
18
|
|
|
18
|
|
6069
|
use Types::Standard qw( Str ArrayRef InstanceOf ); |
|
18
|
|
|
|
|
53
|
|
|
18
|
|
|
|
|
148
|
|
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
=head1 NAME |
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
Test::BDD::Cucumber::Model::Step - Model to represent a step in a scenario |
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
=head1 VERSION |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
version 0.84 |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
=head1 DESCRIPTION |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
Model to represent a step in a scenario |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
=head1 ATTRIBUTES |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
=head2 text |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
The text of the step, once Scenario Outlines have been applied |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
=cut |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
has 'text' => ( is => 'rw', isa => Str ); |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
=head2 verb |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
=head2 verb_original |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
The verb used for the step ('Given'/'When'/etc). C is the one |
33
|
|
|
|
|
|
|
that appeared in the physical file - this will sometimes be C. |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
=cut |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
has 'verb' => ( is => 'rw', isa => Str ); |
38
|
|
|
|
|
|
|
has 'verb_original' => ( is => 'rw', isa => Str ); |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
=head2 line |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
The corresponding L |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
=cut |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
has 'line' => ( is => 'rw', isa => InstanceOf['Test::BDD::Cucumber::Model::Line'] ); |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
=head2 data |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
Step-related data. Either a string in the case of C<"""> or an arrayref of |
51
|
|
|
|
|
|
|
hashrefs for a data table. |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
=cut |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
has 'data' => ( is => 'rw' ); |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
=head2 data_as_strings |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
An arrayref of strings containing the original step's data, for printing out |
60
|
|
|
|
|
|
|
by harnesses |
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
=cut |
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
has 'data_as_strings' => ( |
65
|
|
|
|
|
|
|
is => 'rw', |
66
|
|
|
|
|
|
|
default => sub { [] }, |
67
|
|
|
|
|
|
|
isa => ArrayRef[Str] |
68
|
|
|
|
|
|
|
); |
69
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
=head2 columns |
71
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
If data was in a table format, then the column names will be here in the order |
73
|
|
|
|
|
|
|
they appeared. |
74
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
=cut |
76
|
|
|
|
|
|
|
|
77
|
|
|
|
|
|
|
has 'columns' => ( is => 'rw', isa => ArrayRef[Str] ); |
78
|
|
|
|
|
|
|
|
79
|
|
|
|
|
|
|
=head1 AUTHOR |
80
|
|
|
|
|
|
|
|
81
|
|
|
|
|
|
|
Peter Sergeant C |
82
|
|
|
|
|
|
|
|
83
|
|
|
|
|
|
|
=head1 LICENSE |
84
|
|
|
|
|
|
|
|
85
|
|
|
|
|
|
|
Copyright 2019-2023, Erik Huelsmann |
86
|
|
|
|
|
|
|
Copyright 2011-2019, Peter Sergeant; Licensed under the same terms as Perl |
87
|
|
|
|
|
|
|
|
88
|
|
|
|
|
|
|
=cut |
89
|
|
|
|
|
|
|
|
90
|
|
|
|
|
|
|
1; |