File: Feature.pm

package info (click to toggle)
libtest-bdd-cucumber-perl 0.75-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 680 kB
  • sloc: perl: 7,905; makefile: 8; sh: 5
file content (122 lines) | stat: -rw-r--r-- 2,305 bytes parent folder | download
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
package Test::BDD::Cucumber::Model::Feature;
$Test::BDD::Cucumber::Model::Feature::VERSION = '0.75';
use Moo;
use Types::Standard qw( Str ArrayRef InstanceOf );

=head1 NAME

Test::BDD::Cucumber::Model::Feature - Model to represent a feature file, parsed

=head1 VERSION

version 0.75

=head1 DESCRIPTION

Model to represent a feature file, parsed

=head1 ATTRIBUTES

=head2 name

The text after the C<Feature:> keyword

=cut

has 'name' => ( is => 'rw', isa => Str );

=head2 name_line

A L<Test::BDD::Cucumber::Model::Line> object corresponding to the line the
C<Feature> keyword was found on

=cut

has 'name_line' => ( is => 'rw', isa => InstanceOf['Test::BDD::Cucumber::Model::Line'] );

=head2 satisfaction

An arrayref of strings of the Conditions of Satisfaction

=cut

has 'satisfaction' => (
    is      => 'rw',
    isa     => ArrayRef[InstanceOf['Test::BDD::Cucumber::Model::Line']],
    default => sub { [] }
);

=head2 document

The corresponding L<Test::BDD::Cucumber::Model::Document> object

=cut

has 'document' => ( is => 'rw', isa => InstanceOf['Test::BDD::Cucumber::Model::Document'] );

=head2 background

The L<Test::BDD::Cucumber::Model::Scenario> object that was marked as the
background section.

=cut

has 'background' =>
  ( is => 'rw', isa => InstanceOf['Test::BDD::Cucumber::Model::Scenario'] );

=head2 keyword_original

The keyword used in the input file; equivalent to specification
keyword C<Feature>.

=cut

has 'keyword_original' => ( is => 'rw', isa => Str );


=head2 scenarios

An arrayref of the L<Test::BDD::Cucumber::Model::Scenario> objects that
constitute the test.

=cut

has 'scenarios' => (
    is      => 'rw',
    isa     => ArrayRef[InstanceOf['Test::BDD::Cucumber::Model::Scenario']],
    default => sub { [] }
);

=head2 tags

Tags that the feature has been tagged with, and will pass on to its
Scenarios.

=cut

has 'tags' => ( is => 'rw', isa => ArrayRef[Str], default => sub { [] } );

=head2 language

Language the feature is written in. Defaults to 'en'.

=cut

has 'language' => (
    is      => 'rw',
    isa     => Str,
    default => sub { 'en' }
);

=head1 AUTHOR

Peter Sergeant C<pete@clueball.com>

=head1 LICENSE

  Copyright 2019-2020, Erik Huelsmann
  Copyright 2011-2019, Peter Sergeant; Licensed under the same terms as Perl

=cut

1;