Commit | Line | Data |
7b566394 |
1 | use strict; |
2 | use warnings; |
3 | |
9fbb5be9 |
4 | use Test::More tests => 4; |
5 | use Test::NoWarnings 1.04 ':early'; |
7b566394 |
6 | |
7 | { |
8 | package App; |
9 | use Moose; |
10 | with qw(MooseX::Getopt); |
11 | |
12 | has 'TrackingNumber' => ( |
13 | is => 'rw', |
14 | isa => 'Str', |
15 | ); |
16 | |
17 | has 'otherparam' => ( |
18 | is => 'rw', |
19 | isa => 'Str', |
20 | ); |
21 | } |
22 | |
23 | { |
24 | local @ARGV = ('--TrackingNumber','1Z1234567812345670','--otherparam','foo'); |
25 | |
26 | my $app = App->new_with_options; |
27 | isa_ok($app, 'App'); |
28 | is($app->TrackingNumber, '1Z1234567812345670', '... TrackingNumber is as expected'); |
29 | is($app->otherparam, 'foo', '... otherparam is as expected'); |
30 | } |