Mercurial > pub > Impl
comparison _test/Test/Class/Meta.pm @ 194:4d0e1962161c
Replaced tabs with spaces
IMPL::Web::View - fixed document model, new features (control classes, document constructor parameters)
author | cin |
---|---|
date | Tue, 10 Apr 2012 20:08:29 +0400 |
parents | 76515373dac0 |
children | a8db61d0ed33 |
comparison
equal
deleted
inserted
replaced
193:8e8401c0aea4 | 194:4d0e1962161c |
---|---|
6 __PACKAGE__->PassThroughArgs; | 6 __PACKAGE__->PassThroughArgs; |
7 | 7 |
8 use IMPL::Test qw(test failed); | 8 use IMPL::Test qw(test failed); |
9 | 9 |
10 test defineFooClassData => sub { | 10 test defineFooClassData => sub { |
11 Foo->class_data(info => {}); | 11 Foo->class_data(info => {}); |
12 }; | 12 }; |
13 | 13 |
14 test updateFooClassData => sub { | 14 test updateFooClassData => sub { |
15 Foo->class_data('info')->{data} = 'Foo' ; | 15 Foo->class_data('info')->{data} = 'Foo' ; |
16 }; | 16 }; |
17 | 17 |
18 test getFooClassData => sub { | 18 test getFooClassData => sub { |
19 failed "Wrong class data", "Expected: Foo", "Got: ".Foo->class_data('info')->{data} unless Foo->class_data('info')->{data} eq 'Foo'; | 19 failed "Wrong class data", "Expected: Foo", "Got: ".Foo->class_data('info')->{data} unless Foo->class_data('info')->{data} eq 'Foo'; |
20 }; | 20 }; |
21 | 21 |
22 test getBazClassData => sub { | 22 test getBazClassData => sub { |
23 failed "Wrong class data", "Expected: Foo", "Got: ".Baz->class_data('info')->{data} unless Baz->class_data('info')->{data} eq 'Foo'; | 23 failed "Wrong class data", "Expected: Foo", "Got: ".Baz->class_data('info')->{data} unless Baz->class_data('info')->{data} eq 'Foo'; |
24 }; | 24 }; |
25 | 25 |
26 test updateBarClassData => sub { | 26 test updateBarClassData => sub { |
27 Bar->class_data('info')->{data} = 'Bar'; | 27 Bar->class_data('info')->{data} = 'Bar'; |
28 }; | 28 }; |
29 | 29 |
30 test getBarClassData => sub { | 30 test getBarClassData => sub { |
31 failed "Wrong class data", "Expected: Bar", "Got: ".Bar->class_data('info')->{data} unless Bar->class_data('info')->{data} eq 'Bar'; | 31 failed "Wrong class data", "Expected: Bar", "Got: ".Bar->class_data('info')->{data} unless Bar->class_data('info')->{data} eq 'Bar'; |
32 }; | 32 }; |
33 | 33 |
34 test validatetFooClassData => sub { | 34 test validatetFooClassData => sub { |
35 failed "Wrong class data", "Expected: Foo", "Got: ".Foo->class_data('info')->{data} unless Foo->class_data('info')->{data} eq 'Foo'; | 35 failed "Wrong class data", "Expected: Foo", "Got: ".Foo->class_data('info')->{data} unless Foo->class_data('info')->{data} eq 'Foo'; |
36 }; | 36 }; |
37 | 37 |
38 test validateBazClassData => sub { | 38 test validateBazClassData => sub { |
39 failed "Wrong class data", "Expected: Foo", "Got: ".Baz->class_data('info')->{data} unless Baz->class_data('info')->{data} eq 'Foo'; | 39 failed "Wrong class data", "Expected: Foo", "Got: ".Baz->class_data('info')->{data} unless Baz->class_data('info')->{data} eq 'Foo'; |
40 }; | 40 }; |
41 | 41 |
42 test getwrongBazClassData => sub { | 42 test getwrongBazClassData => sub { |
43 failed "Wrong class data", "Expected: undef", "Got: ".Foo->class_data( 'info2' ) if Foo->class_data( 'info2' ); | 43 failed "Wrong class data", "Expected: undef", "Got: ".Foo->class_data( 'info2' ) if Foo->class_data( 'info2' ); |
44 }; | 44 }; |
45 | 45 |
46 | 46 |
47 | 47 |
48 package Foo; | 48 package Foo; |