File Coverage

blib/lib/DesktopWorkspace/Test/Spec/Basic.pm
Criterion Covered Total %
statement 23 26 88.4
branch 3 6 50.0
condition n/a
subroutine 8 8 100.0
pod 0 4 0.0
total 34 44 77.2


line stmt bran cond sub pod time code
1             package DesktopWorkspace::Test::Spec::Basic;
2              
3 2     2   346013 use strict;
  2         4  
  2         65  
4 2     2   7 use warnings;
  2         3  
  2         92  
5              
6 2     2   869 use Data::Clone;
  2         1800  
  2         139  
7 2     2   819 use Role::Tiny::With;
  2         10248  
  2         489  
8              
9             with 'DesktopWorkspaceRole::Spec::Basic';
10              
11             our $AUTHORITY = 'cpan:PERLANCAR'; # AUTHORITY
12             our $DATE = '2026-03-29'; # DATE
13             our $DIST = 'DesktopWorkspace'; # DIST
14             our $VERSION = '1.0.0'; # VERSION
15              
16             my $spec = {
17             summary => 'A summary',
18             kde_activity => 'foo',
19             items => [
20             {url => 'https://www.example.com'},
21             {file => '/foo'},
22             {dir => '/bar'},
23             {app_path => '/usr/bin/dolphin'},
24             ],
25             };
26              
27             sub new {
28 1     1 0 246372 my $class = shift;
29 1         18 bless clone($spec), $class;
30             }
31              
32             sub items {
33 1     1 0 1203 my $self = shift;
34 1 50       4 if (@_) {
35 0         0 $self->{items} = $_[0];
36             } else {
37 1         7 $self->{items};
38             }
39             }
40              
41             sub kde_activity {
42 1     1 0 2441 my $self = shift;
43 1 50       4 if (@_) {
44 0         0 $self->{kde_activity} = $_[0];
45             } else {
46 1         4 $self->{kde_activity};
47             }
48             }
49              
50             sub new_browser_window {
51 1     1 0 2231 my $self = shift;
52 1 50       3 if (@_) {
53 0         0 $self->{new_browser_window} = $_[0];
54             } else {
55 1         3 $self->{new_browse_window};
56             }
57             }
58              
59             1;
60              
61             # ABSTRACT: A test desktop workspace
62              
63             __END__