2 # This is automatically generated by author/import-moose-test.pl.
3 # DO NOT EDIT THIS FILE. ANY CHANGES WILL BE LOST!!!
4 use t::lib::MooseCompat;
10 $TODO = q{Mouse is not yet completed};
13 use Mouse::Meta::Role::Application;
14 use Mouse::Meta::Role::Composite;
25 package Role::ProvidesFoo;
27 sub foo { 'Role::ProvidesFoo::foo' }
29 package Role::ProvidesBar;
31 sub bar { 'Role::ProvidesBar::bar' }
34 # test simple requirement
36 my $c = Mouse::Meta::Role::Composite->new(
42 isa_ok($c, 'Mouse::Meta::Role::Composite');
44 is($c->name, 'Role::Foo|Role::Bar', '... got the composite role name');
47 Mouse::Meta::Role::Application->new->apply($c);
48 } '... this succeeds as expected';
51 [ sort $c->get_required_method_list ],
53 '... got the right list of required methods'
57 # test requirement satisfied
59 my $c = Mouse::Meta::Role::Composite->new(
62 Role::ProvidesFoo->meta,
65 isa_ok($c, 'Mouse::Meta::Role::Composite');
67 is($c->name, 'Role::Foo|Role::ProvidesFoo', '... got the composite role name');
70 Mouse::Meta::Role::Application->new->apply($c);
71 } '... this succeeds as expected';
74 [ sort $c->get_required_method_list ],
76 '... got the right list of required methods'
80 # test requirement satisfied
82 my $c = Mouse::Meta::Role::Composite->new(
85 Role::ProvidesFoo->meta,
89 isa_ok($c, 'Mouse::Meta::Role::Composite');
91 is($c->name, 'Role::Foo|Role::ProvidesFoo|Role::Bar', '... got the composite role name');
94 Mouse::Meta::Role::Application->new->apply($c);
95 } '... this succeeds as expected';
98 [ sort $c->get_required_method_list ],
100 '... got the right list of required methods'
104 # test requirement satisfied
106 my $c = Mouse::Meta::Role::Composite->new(
109 Role::ProvidesFoo->meta,
110 Role::ProvidesBar->meta,
114 isa_ok($c, 'Mouse::Meta::Role::Composite');
116 is($c->name, 'Role::Foo|Role::ProvidesFoo|Role::ProvidesBar|Role::Bar', '... got the composite role name');
119 Mouse::Meta::Role::Application->new->apply($c);
120 } '... this succeeds as expected';
123 [ sort $c->get_required_method_list ],
125 '... got the right list of required methods'