annotate _test/Test/Config/Container.pm @ 417:3ed0c58e9da3 ref20150831

working on di container, tests
author cin
date Mon, 02 Nov 2015 01:56:53 +0300
parents
children 3f38dabaf5cc
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
417
3ed0c58e9da3 working on di container, tests
cin
parents:
diff changeset
1 package Test::Config::Container;
3ed0c58e9da3 working on di container, tests
cin
parents:
diff changeset
2 use strict;
3ed0c58e9da3 working on di container, tests
cin
parents:
diff changeset
3
3ed0c58e9da3 working on di container, tests
cin
parents:
diff changeset
4 {
3ed0c58e9da3 working on di container, tests
cin
parents:
diff changeset
5 package Test::Config::Container::Baz;
3ed0c58e9da3 working on di container, tests
cin
parents:
diff changeset
6 use IMPL::declare {
3ed0c58e9da3 working on di container, tests
cin
parents:
diff changeset
7 base => {
3ed0c58e9da3 working on di container, tests
cin
parents:
diff changeset
8 'IMPL::Object' => undef
3ed0c58e9da3 working on di container, tests
cin
parents:
diff changeset
9 },
3ed0c58e9da3 working on di container, tests
cin
parents:
diff changeset
10 props => [
3ed0c58e9da3 working on di container, tests
cin
parents:
diff changeset
11 value => 'r'
3ed0c58e9da3 working on di container, tests
cin
parents:
diff changeset
12 ]
3ed0c58e9da3 working on di container, tests
cin
parents:
diff changeset
13 };
3ed0c58e9da3 working on di container, tests
cin
parents:
diff changeset
14
3ed0c58e9da3 working on di container, tests
cin
parents:
diff changeset
15 sub CTOR {
3ed0c58e9da3 working on di container, tests
cin
parents:
diff changeset
16 my $this = shift;
3ed0c58e9da3 working on di container, tests
cin
parents:
diff changeset
17 $this->value(shift);
3ed0c58e9da3 working on di container, tests
cin
parents:
diff changeset
18 }
3ed0c58e9da3 working on di container, tests
cin
parents:
diff changeset
19 }
3ed0c58e9da3 working on di container, tests
cin
parents:
diff changeset
20
3ed0c58e9da3 working on di container, tests
cin
parents:
diff changeset
21 use IMPL::declare {
3ed0c58e9da3 working on di container, tests
cin
parents:
diff changeset
22 require => {
3ed0c58e9da3 working on di container, tests
cin
parents:
diff changeset
23 Container => 'IMPL::Config::Container'
3ed0c58e9da3 working on di container, tests
cin
parents:
diff changeset
24 },
3ed0c58e9da3 working on di container, tests
cin
parents:
diff changeset
25 base => {
3ed0c58e9da3 working on di container, tests
cin
parents:
diff changeset
26 'IMPL::Test::Unit' => '@_'
3ed0c58e9da3 working on di container, tests
cin
parents:
diff changeset
27 }
3ed0c58e9da3 working on di container, tests
cin
parents:
diff changeset
28 };
3ed0c58e9da3 working on di container, tests
cin
parents:
diff changeset
29 use IMPL::Test qw(test assert failed);
3ed0c58e9da3 working on di container, tests
cin
parents:
diff changeset
30
3ed0c58e9da3 working on di container, tests
cin
parents:
diff changeset
31 test CreateContainer => sub {
3ed0c58e9da3 working on di container, tests
cin
parents:
diff changeset
32 my $c1 = Container->new();
3ed0c58e9da3 working on di container, tests
cin
parents:
diff changeset
33 };
3ed0c58e9da3 working on di container, tests
cin
parents:
diff changeset
34
3ed0c58e9da3 working on di container, tests
cin
parents:
diff changeset
35 sub RegisterServices {
3ed0c58e9da3 working on di container, tests
cin
parents:
diff changeset
36 my $c1 = Container->new();
3ed0c58e9da3 working on di container, tests
cin
parents:
diff changeset
37 }
3ed0c58e9da3 working on di container, tests
cin
parents:
diff changeset
38
3ed0c58e9da3 working on di container, tests
cin
parents:
diff changeset
39
3ed0c58e9da3 working on di container, tests
cin
parents:
diff changeset
40 1;