| 1 | 28 | ▶ | use v5.14; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 2 | 28 | ▶ | use warnings; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 3 | |||
| 4 | package Test::BDD::Cucumber::Model::Scenario 0.87; | ||
| 5 | |||
| 6 | 28 | ▶ | use Moo; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 7 | 28 | ▶ | use Types::Standard qw( Str ArrayRef HashRef Bool InstanceOf ); |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 8 | |||
| 9 | 28 | ▶ | use Carp; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 10 | |||
| 11 | =head1 NAME | ||
| 12 | |||
| 13 | Test::BDD::Cucumber::Model::Scenario - Model to represent a scenario | ||
| 14 | |||
| 15 | =head1 VERSION | ||
| 16 | |||
| 17 | version 0.87 | ||
| 18 | |||
| 19 | =head1 DESCRIPTION | ||
| 20 | |||
| 21 | Model to represent a scenario | ||
| 22 | |||
| 23 | =head1 ATTRIBUTES | ||
| 24 | |||
| 25 | =head2 name | ||
| 26 | |||
| 27 | The text after the C<Scenario:> keyword | ||
| 28 | |||
| 29 | =cut | ||
| 30 | |||
| 31 | 28 | has 'name' => ( is => 'rw', isa => Str ); | |
| 32 | |||
| 33 | =head2 description | ||
| 34 | |||
| 35 | The text between the Scenario line and the first step line | ||
| 36 | |||
| 37 | =cut | ||
| 38 | |||
| 39 | has 'description' => ( | ||
| 40 | is => 'rw', | ||
| 41 | isa => ArrayRef[InstanceOf['Test::BDD::Cucumber::Model::Line']], | ||
| 42 | 247 | ▶ | default => sub { [] }, |
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
| |||
| 43 | 28 | ); | |
| 44 | |||
| 45 | =head2 steps | ||
| 46 | |||
| 47 | The associated L<Test:BDD::Cucumber::Model::Step> objects | ||
| 48 | |||
| 49 | =cut | ||
| 50 | |||
| 51 | has 'steps' => ( | ||
| 52 | is => 'rw', | ||
| 53 | isa => ArrayRef[InstanceOf['Test::BDD::Cucumber::Model::Step']], | ||
| 54 | 247 | ▶ | default => sub { [] } |
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
| |||
| 55 | 28 | ); | |
| 56 | |||
| 57 | =head2 datasets | ||
| 58 | |||
| 59 | The dataset(s) associated with a scenario. | ||
| 60 | |||
| 61 | =cut | ||
| 62 | |||
| 63 | has 'datasets' => ( | ||
| 64 | is => 'rw', | ||
| 65 | isa => ArrayRef[InstanceOf['Test::BDD::Cucumber::Model::Dataset']], | ||
| 66 | 247 | ▶ | default => sub { [] } |
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
| |||
| 67 | 28 | ); | |
| 68 | |||
| 69 | =head2 background | ||
| 70 | |||
| 71 | Boolean flag to mark whether this was the background section | ||
| 72 | |||
| 73 | =cut | ||
| 74 | |||
| 75 | 28 | has 'background' => ( is => 'rw', isa => Bool, default => 0 ); | |
| 76 | |||
| 77 | =head2 keyword | ||
| 78 | |||
| 79 | =head2 keyword_original | ||
| 80 | |||
| 81 | The keyword used in the input file (C<keyword_original>) and its specification | ||
| 82 | equivalent (C<keyword>) used to start this scenario. (I.e. C<Background>, | ||
| 83 | C<Scenario> and C<Scenario Outiline>.) | ||
| 84 | |||
| 85 | =cut | ||
| 86 | |||
| 87 | 28 | has 'keyword' => ( is => 'rw', isa => Str ); | |
| 88 | 28 | has 'keyword_original' => ( is => 'rw', isa => Str ); | |
| 89 | |||
| 90 | |||
| 91 | =head2 line | ||
| 92 | |||
| 93 | A L<Test::BDD::Cucumber::Model::Line> object corresponding to the line where | ||
| 94 | the C<Scenario> keyword is. | ||
| 95 | |||
| 96 | =cut | ||
| 97 | |||
| 98 | 28 | has 'line' => ( is => 'rw', isa => InstanceOf['Test::BDD::Cucumber::Model::Line'] ); | |
| 99 | |||
| 100 | =head2 tags | ||
| 101 | |||
| 102 | Tags that the scenario has been tagged with, and has inherited from its | ||
| 103 | feature. | ||
| 104 | |||
| 105 | =cut | ||
| 106 | |||
| 107 | 0 | ▶ | has 'tags' => ( is => 'rw', isa => ArrayRef[Str], default => sub { [] } ); |
|
Subroutine
__ANON__: not called CC=1 SCAR=1.2
| |||
| 108 | |||
| 109 | =head1 AUTHOR | ||
| 110 | |||
| 111 | Peter Sergeant C<pete@clueball.com> | ||
| 112 | |||
| 113 | =head1 LICENSE | ||
| 114 | |||
| 115 | Copyright 2019-2023, Erik Huelsmann | ||
| 116 | Copyright 2011-2019, Peter Sergeant; Licensed under the same terms as Perl | ||
| 117 | |||
| 118 | =cut | ||
| 119 | |||
| 120 | 28 | 1; | |