Commit | Line | Data |
c4481e73 |
1 | package RTest::UI::View; |
2 | |
3 | use base qw/Reaction::Test/; |
4 | use Reaction::Class; |
5 | use Test::More (); |
6 | use Reaction::UI::View ; |
7 | |
8 | |
9 | #has 'view' => (isa => 'Reaction::UI::View', is => 'ro', lazy_build => 1); |
10 | #view doesn't yet have TCs for this so ican get away with it ... |
11 | #sub _build_view { |
12 | # Reaction::UI::View->new( |
13 | # ); |
14 | #} |
15 | |
16 | sub test_layoutset_name_generation :Tests { |
17 | my $self = shift; |
18 | my %cases = |
19 | ( |
20 | 'MyApp::ViewPort::FooBar' => 'foo_bar', |
21 | 'Reaction::UI::ViewPort::Foo_Bar' => 'foo_bar', |
22 | 'MyApp::UI::ViewPort::FOOBar::fooBAR' => 'foo_bar/foo_bar', |
23 | 'Reaction::UI::ViewPort::FooBARBaz::FooBAR_' => 'foo_bar_baz/foo_bar_', |
24 | ); |
25 | while(my($class,$layout) = each %cases ){ |
26 | my $res = Reaction::UI::View->layout_set_name_from_viewport($class); |
27 | Test::More::is($res,$layout,"layoutset name for $class") |
28 | } |
29 | |
30 | } |
31 | |
32 | 1; |