| 1 | package WebService::TeamCity::Entity::TestOccurrence; | ||
| 2 | |||
| 3 | 4 | ▶ | use v5.10; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 4 | 4 | ▶ | use strict; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 5 | 4 | ▶ | use warnings; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 6 | 4 | ▶ | use namespace::autoclean; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 7 | |||
| 8 | 4 | our $VERSION = '0.04'; | |
| 9 | |||
| 10 | 4 | ▶ | use Types::Standard qw( Bool InstanceOf Int Str ); |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 11 | 4 | ▶ | use WebService::TeamCity::Types qw( TestStatus ); |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 12 | 4 | ▶ | use WebService::TeamCity::Types qw( JSONBool ); |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 13 | |||
| 14 | 4 | ▶ | use Moo; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 15 | |||
| 16 | 4 | has status => ( | |
| 17 | is => 'ro', | ||
| 18 | isa => TestStatus, | ||
| 19 | required => 1, | ||
| 20 | ); | ||
| 21 | |||
| 22 | 4 | has duration => ( | |
| 23 | is => 'ro', | ||
| 24 | isa => Int, | ||
| 25 | default => 0, | ||
| 26 | ); | ||
| 27 | |||
| 28 | has build => ( | ||
| 29 | is => 'ro', | ||
| 30 | isa => InstanceOf ['WebService::TeamCity::Entity::Build'], | ||
| 31 | lazy => 1, | ||
| 32 | 1 | ▶ | default => sub { |
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
| |||
| 33 | $_[0]->_inflate_one( | ||
| 34 | $_[0]->_full_data->{build}, | ||
| 35 | 1 | 'Build', | |
| 36 | ); | ||
| 37 | }, | ||
| 38 | 4 | ); | |
| 39 | |||
| 40 | has unknown => ( | ||
| 41 | is => 'ro', | ||
| 42 | isa => Bool | JSONBool, | ||
| 43 | lazy => 1, | ||
| 44 | 0 | ▶ | default => sub { $_[0]->status eq 'UNKNOWN' }, |
|
Subroutine
__ANON__: not called CC=1 SCAR=6.9
| |||
| 45 | 4 | ); | |
| 46 | |||
| 47 | has details => ( | ||
| 48 | is => 'ro', | ||
| 49 | isa => Str, | ||
| 50 | lazy => 1, | ||
| 51 | 1 | ▶ | default => sub { $_[0]->_full_data->{details} }, |
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
| |||
| 52 | 4 | ); | |
| 53 | |||
| 54 | 4 | with( | |
| 55 | 'WebService::TeamCity::Entity', | ||
| 56 | 'WebService::TeamCity::Entity::HasID', | ||
| 57 | 'WebService::TeamCity::Entity::HasName', | ||
| 58 | 'WebService::TeamCity::Entity::HasStatus', | ||
| 59 | ); | ||
| 60 | |||
| 61 | 4 | 1; | |
| 62 | |||
| 63 | # ABSTRACT: A single TeamCity test occurrence | ||
| 64 | |||
| 65 | __END__ | ||