line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Test::BDD::Cucumber::Model::Feature; |
2
|
|
|
|
|
|
|
$Test::BDD::Cucumber::Model::Feature::VERSION = '0.84'; |
3
|
18
|
|
|
18
|
|
142
|
use Moo; |
|
18
|
|
|
|
|
48
|
|
|
18
|
|
|
|
|
125
|
|
4
|
18
|
|
|
18
|
|
5901
|
use Types::Standard qw( Str ArrayRef InstanceOf ); |
|
18
|
|
|
|
|
49
|
|
|
18
|
|
|
|
|
153
|
|
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
=head1 NAME |
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
Test::BDD::Cucumber::Model::Feature - Model to represent a feature file, parsed |
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
=head1 VERSION |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
version 0.84 |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
=head1 DESCRIPTION |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
Model to represent a feature file, parsed |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
=head1 ATTRIBUTES |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
=head2 name |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
The text after the C keyword |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
=cut |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
has 'name' => ( is => 'rw', isa => Str ); |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
=head2 name_line |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
A L object corresponding to the line the |
31
|
|
|
|
|
|
|
C keyword was found on |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
=cut |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
has 'name_line' => ( is => 'rw', isa => InstanceOf['Test::BDD::Cucumber::Model::Line'] ); |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
=head2 satisfaction |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
An arrayref of strings of the Conditions of Satisfaction |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
=cut |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
has 'satisfaction' => ( |
44
|
|
|
|
|
|
|
is => 'rw', |
45
|
|
|
|
|
|
|
isa => ArrayRef[InstanceOf['Test::BDD::Cucumber::Model::Line']], |
46
|
|
|
|
|
|
|
default => sub { [] } |
47
|
|
|
|
|
|
|
); |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
=head2 document |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
The corresponding L object |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
=cut |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
has 'document' => ( is => 'rw', isa => InstanceOf['Test::BDD::Cucumber::Model::Document'] ); |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
=head2 background |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
The L object that was marked as the |
60
|
|
|
|
|
|
|
background section. |
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
=cut |
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
has 'background' => |
65
|
|
|
|
|
|
|
( is => 'rw', isa => InstanceOf['Test::BDD::Cucumber::Model::Scenario'] ); |
66
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
=head2 keyword_original |
68
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
The keyword used in the input file; equivalent to specification |
70
|
|
|
|
|
|
|
keyword C. |
71
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
=cut |
73
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
has 'keyword_original' => ( is => 'rw', isa => Str ); |
75
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
|
77
|
|
|
|
|
|
|
=head2 scenarios |
78
|
|
|
|
|
|
|
|
79
|
|
|
|
|
|
|
An arrayref of the L objects that |
80
|
|
|
|
|
|
|
constitute the test. |
81
|
|
|
|
|
|
|
|
82
|
|
|
|
|
|
|
=cut |
83
|
|
|
|
|
|
|
|
84
|
|
|
|
|
|
|
has 'scenarios' => ( |
85
|
|
|
|
|
|
|
is => 'rw', |
86
|
|
|
|
|
|
|
isa => ArrayRef[InstanceOf['Test::BDD::Cucumber::Model::Scenario']], |
87
|
|
|
|
|
|
|
default => sub { [] } |
88
|
|
|
|
|
|
|
); |
89
|
|
|
|
|
|
|
|
90
|
|
|
|
|
|
|
=head2 tags |
91
|
|
|
|
|
|
|
|
92
|
|
|
|
|
|
|
Tags that the feature has been tagged with, and will pass on to its |
93
|
|
|
|
|
|
|
Scenarios. |
94
|
|
|
|
|
|
|
|
95
|
|
|
|
|
|
|
=cut |
96
|
|
|
|
|
|
|
|
97
|
|
|
|
|
|
|
has 'tags' => ( is => 'rw', isa => ArrayRef[Str], default => sub { [] } ); |
98
|
|
|
|
|
|
|
|
99
|
|
|
|
|
|
|
=head2 language |
100
|
|
|
|
|
|
|
|
101
|
|
|
|
|
|
|
Language the feature is written in. Defaults to 'en'. |
102
|
|
|
|
|
|
|
|
103
|
|
|
|
|
|
|
=cut |
104
|
|
|
|
|
|
|
|
105
|
|
|
|
|
|
|
has 'language' => ( |
106
|
|
|
|
|
|
|
is => 'rw', |
107
|
|
|
|
|
|
|
isa => Str, |
108
|
|
|
|
|
|
|
default => sub { 'en' } |
109
|
|
|
|
|
|
|
); |
110
|
|
|
|
|
|
|
|
111
|
|
|
|
|
|
|
=head1 AUTHOR |
112
|
|
|
|
|
|
|
|
113
|
|
|
|
|
|
|
Peter Sergeant C |
114
|
|
|
|
|
|
|
|
115
|
|
|
|
|
|
|
=head1 LICENSE |
116
|
|
|
|
|
|
|
|
117
|
|
|
|
|
|
|
Copyright 2019-2023, Erik Huelsmann |
118
|
|
|
|
|
|
|
Copyright 2011-2019, Peter Sergeant; Licensed under the same terms as Perl |
119
|
|
|
|
|
|
|
|
120
|
|
|
|
|
|
|
=cut |
121
|
|
|
|
|
|
|
|
122
|
|
|
|
|
|
|
1; |