417
|
1 package Test::Config::Container;
|
|
2 use strict;
|
|
3
|
|
4 {
|
|
5 package Test::Config::Container::Baz;
|
|
6 use IMPL::declare {
|
|
7 base => {
|
|
8 'IMPL::Object' => undef
|
|
9 },
|
|
10 props => [
|
|
11 value => 'r'
|
|
12 ]
|
|
13 };
|
|
14
|
|
15 sub CTOR {
|
|
16 my $this = shift;
|
|
17 $this->value(shift);
|
|
18 }
|
|
19 }
|
|
20
|
|
21 use IMPL::declare {
|
|
22 require => {
|
418
|
23 Container => 'IMPL::Config::Container',
|
|
24
|
417
|
25 },
|
|
26 base => {
|
|
27 'IMPL::Test::Unit' => '@_'
|
|
28 }
|
|
29 };
|
|
30 use IMPL::Test qw(test assert failed);
|
|
31
|
|
32 test CreateContainer => sub {
|
|
33 my $c1 = Container->new();
|
|
34 };
|
|
35
|
418
|
36 test RegisterServices => sub {
|
417
|
37 my $c1 = Container->new();
|
418
|
38
|
|
39 $c1->Register( 'db' => Service->new(
|
|
40 type => 'Foo::Data',
|
|
41 norequire => 1,
|
|
42 activation => 'container'
|
|
43 ));
|
|
44
|
|
45 return $c1;
|
|
46 };
|
|
47
|
|
48 test ResolveServices => sub {
|
|
49
|
|
50 };
|
417
|
51
|
|
52
|
|
53 1; |