annotate _test/Test/Web/Application.pm @ 254:fb52014f6931

updated web-session creation
author sergey
date Thu, 06 Dec 2012 19:58:42 +0400
parents 4d0e1962161c
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
60
b0c068da93ac Lazy activation for the configuration objects (final concept)
wizard
parents:
diff changeset
1 package Test::Web::Application::Instance;
b0c068da93ac Lazy activation for the configuration objects (final concept)
wizard
parents:
diff changeset
2 package Test::Web::Application;
b0c068da93ac Lazy activation for the configuration objects (final concept)
wizard
parents:
diff changeset
3 use strict;
166
4267a2ac3d46 Added Class::Template,
wizard
parents: 63
diff changeset
4 use parent qw(IMPL::Test::Unit);
60
b0c068da93ac Lazy activation for the configuration objects (final concept)
wizard
parents:
diff changeset
5
b0c068da93ac Lazy activation for the configuration objects (final concept)
wizard
parents:
diff changeset
6 use IMPL::Test qw(test failed);
b0c068da93ac Lazy activation for the configuration objects (final concept)
wizard
parents:
diff changeset
7 require IMPL::Web::Application;
b0c068da93ac Lazy activation for the configuration objects (final concept)
wizard
parents:
diff changeset
8
b0c068da93ac Lazy activation for the configuration objects (final concept)
wizard
parents:
diff changeset
9 __PACKAGE__->PassThroughArgs;
b0c068da93ac Lazy activation for the configuration objects (final concept)
wizard
parents:
diff changeset
10
b0c068da93ac Lazy activation for the configuration objects (final concept)
wizard
parents:
diff changeset
11 sub CTOR {
194
4d0e1962161c Replaced tabs with spaces
cin
parents: 180
diff changeset
12 # simulate CGI environment
4d0e1962161c Replaced tabs with spaces
cin
parents: 180
diff changeset
13
4d0e1962161c Replaced tabs with spaces
cin
parents: 180
diff changeset
14 $ENV{PATH_TRANSLATED} = "Resources/simple.tt";
60
b0c068da93ac Lazy activation for the configuration objects (final concept)
wizard
parents:
diff changeset
15 }
b0c068da93ac Lazy activation for the configuration objects (final concept)
wizard
parents:
diff changeset
16
b0c068da93ac Lazy activation for the configuration objects (final concept)
wizard
parents:
diff changeset
17 test SpawnApp => sub {
194
4d0e1962161c Replaced tabs with spaces
cin
parents: 180
diff changeset
18 my $instance = spawn Test::Web::Application::Instance('Resources/app.xml');
4d0e1962161c Replaced tabs with spaces
cin
parents: 180
diff changeset
19
4d0e1962161c Replaced tabs with spaces
cin
parents: 180
diff changeset
20 return 1;
60
b0c068da93ac Lazy activation for the configuration objects (final concept)
wizard
parents:
diff changeset
21 };
b0c068da93ac Lazy activation for the configuration objects (final concept)
wizard
parents:
diff changeset
22
b0c068da93ac Lazy activation for the configuration objects (final concept)
wizard
parents:
diff changeset
23 test ActivateOnDemand => sub {
194
4d0e1962161c Replaced tabs with spaces
cin
parents: 180
diff changeset
24 my $instance = spawn Test::Web::Application::Instance('Resources/app.xml');
4d0e1962161c Replaced tabs with spaces
cin
parents: 180
diff changeset
25
4d0e1962161c Replaced tabs with spaces
cin
parents: 180
diff changeset
26 my $ds = $instance->dataSource;
4d0e1962161c Replaced tabs with spaces
cin
parents: 180
diff changeset
27
4d0e1962161c Replaced tabs with spaces
cin
parents: 180
diff changeset
28 return 1;
60
b0c068da93ac Lazy activation for the configuration objects (final concept)
wizard
parents:
diff changeset
29 };
b0c068da93ac Lazy activation for the configuration objects (final concept)
wizard
parents:
diff changeset
30
61
8d0ae27d15c1 minor changes
wizard
parents: 60
diff changeset
31 test SaveXml => sub {
194
4d0e1962161c Replaced tabs with spaces
cin
parents: 180
diff changeset
32 my $instance = spawn Test::Web::Application::Instance('Resources/app.xml');
4d0e1962161c Replaced tabs with spaces
cin
parents: 180
diff changeset
33
4d0e1962161c Replaced tabs with spaces
cin
parents: 180
diff changeset
34 $instance->xml or failed "xml property is invalid";
63
76b878ad6596 Added serialization support for the IMPL::Object::List
wizard
parents: 61
diff changeset
35 };
76b878ad6596 Added serialization support for the IMPL::Object::List
wizard
parents: 61
diff changeset
36
76b878ad6596 Added serialization support for the IMPL::Object::List
wizard
parents: 61
diff changeset
37 test Run => sub {
194
4d0e1962161c Replaced tabs with spaces
cin
parents: 180
diff changeset
38 my $instance = spawn Test::Web::Application::Instance('Resources/app.xml');
4d0e1962161c Replaced tabs with spaces
cin
parents: 180
diff changeset
39 $instance->Run();
61
8d0ae27d15c1 minor changes
wizard
parents: 60
diff changeset
40 };
8d0ae27d15c1 minor changes
wizard
parents: 60
diff changeset
41
60
b0c068da93ac Lazy activation for the configuration objects (final concept)
wizard
parents:
diff changeset
42 package Test::Web::Application::Instance;
166
4267a2ac3d46 Added Class::Template,
wizard
parents: 63
diff changeset
43 use parent qw(IMPL::Web::Application);
60
b0c068da93ac Lazy activation for the configuration objects (final concept)
wizard
parents:
diff changeset
44
b0c068da93ac Lazy activation for the configuration objects (final concept)
wizard
parents:
diff changeset
45 __PACKAGE__->PassThroughArgs;
b0c068da93ac Lazy activation for the configuration objects (final concept)
wizard
parents:
diff changeset
46
b0c068da93ac Lazy activation for the configuration objects (final concept)
wizard
parents:
diff changeset
47 use IMPL::Class::Property;
b0c068da93ac Lazy activation for the configuration objects (final concept)
wizard
parents:
diff changeset
48
b0c068da93ac Lazy activation for the configuration objects (final concept)
wizard
parents:
diff changeset
49 BEGIN {
194
4d0e1962161c Replaced tabs with spaces
cin
parents: 180
diff changeset
50 public property name => prop_all;
4d0e1962161c Replaced tabs with spaces
cin
parents: 180
diff changeset
51 public property options => prop_all;
4d0e1962161c Replaced tabs with spaces
cin
parents: 180
diff changeset
52 public property dataSource => prop_all;
4d0e1962161c Replaced tabs with spaces
cin
parents: 180
diff changeset
53 public property securityMod => prop_all;
60
b0c068da93ac Lazy activation for the configuration objects (final concept)
wizard
parents:
diff changeset
54 }
b0c068da93ac Lazy activation for the configuration objects (final concept)
wizard
parents:
diff changeset
55
b0c068da93ac Lazy activation for the configuration objects (final concept)
wizard
parents:
diff changeset
56
180
d1676be8afcc Перекодировка в utf-8
sourcer
parents: 166
diff changeset
57 1;