comparison _test/Test/Web/Application.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 d1676be8afcc
children
comparison
equal deleted inserted replaced
193:8e8401c0aea4 194:4d0e1962161c
7 require IMPL::Web::Application; 7 require IMPL::Web::Application;
8 8
9 __PACKAGE__->PassThroughArgs; 9 __PACKAGE__->PassThroughArgs;
10 10
11 sub CTOR { 11 sub CTOR {
12 # simulate CGI environment 12 # simulate CGI environment
13 13
14 $ENV{PATH_TRANSLATED} = "Resources/simple.tt"; 14 $ENV{PATH_TRANSLATED} = "Resources/simple.tt";
15 } 15 }
16 16
17 test SpawnApp => sub { 17 test SpawnApp => sub {
18 my $instance = spawn Test::Web::Application::Instance('Resources/app.xml'); 18 my $instance = spawn Test::Web::Application::Instance('Resources/app.xml');
19 19
20 return 1; 20 return 1;
21 }; 21 };
22 22
23 test ActivateOnDemand => sub { 23 test ActivateOnDemand => sub {
24 my $instance = spawn Test::Web::Application::Instance('Resources/app.xml'); 24 my $instance = spawn Test::Web::Application::Instance('Resources/app.xml');
25 25
26 my $ds = $instance->dataSource; 26 my $ds = $instance->dataSource;
27 27
28 return 1; 28 return 1;
29 }; 29 };
30 30
31 test SaveXml => sub { 31 test SaveXml => sub {
32 my $instance = spawn Test::Web::Application::Instance('Resources/app.xml'); 32 my $instance = spawn Test::Web::Application::Instance('Resources/app.xml');
33 33
34 $instance->xml or failed "xml property is invalid"; 34 $instance->xml or failed "xml property is invalid";
35 }; 35 };
36 36
37 test Run => sub { 37 test Run => sub {
38 my $instance = spawn Test::Web::Application::Instance('Resources/app.xml'); 38 my $instance = spawn Test::Web::Application::Instance('Resources/app.xml');
39 $instance->Run(); 39 $instance->Run();
40 }; 40 };
41 41
42 package Test::Web::Application::Instance; 42 package Test::Web::Application::Instance;
43 use parent qw(IMPL::Web::Application); 43 use parent qw(IMPL::Web::Application);
44 44
45 __PACKAGE__->PassThroughArgs; 45 __PACKAGE__->PassThroughArgs;
46 46
47 use IMPL::Class::Property; 47 use IMPL::Class::Property;
48 48
49 BEGIN { 49 BEGIN {
50 public property name => prop_all; 50 public property name => prop_all;
51 public property options => prop_all; 51 public property options => prop_all;
52 public property dataSource => prop_all; 52 public property dataSource => prop_all;
53 public property securityMod => prop_all; 53 public property securityMod => prop_all;
54 } 54 }
55 55
56 56
57 1; 57 1;