ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/COMP/SCRAM/src/ActiveDoc/DocTester.pm
Revision: 1.7
Committed: Thu Dec 8 15:43:43 2005 UTC (19 years, 5 months ago) by sashby
Content type: text/plain
Branch: MAIN
CVS Tags: HEAD
Changes since 1.6: +0 -0 lines
State: FILE REMOVED
Log Message:
Obsolete packages removed.

File Contents

# User Rev Content
1 sashby 1.6 BEGIN
2     {
3     print " ActiveDoc::DocTester: I AM used!!","\n";
4     };
5    
6    
7 williamc 1.1 #
8     # DocTester.pm
9     #
10     # Originally Written by Christopher Williams
11     #
12     # Description
13     # -----------
14     # Extension of TestUtilities for doc testing
15     #
16     # Interface
17     # ---------
18     # new() : A new DocTester object
19 williamc 1.2 # initdoc([docstore]) : initialise starter doc etc.
20     # --- after initdoc can call
21 williamc 1.3 # newtestdoc(url) : create a new document with the given url
22 williamc 1.2 # docstore() : return the base document store
23 williamc 1.1
24     package ActiveDoc::DocTester;
25     require 5.004;
26     use ActiveDoc::Application;
27     use ActiveDoc::Query;
28     use Utilities::TestClass;
29    
30     @ISA=qw(Utilities::TestClass);
31    
32     sub initdoc {
33     my $self=shift;
34     if ( @_ ) {
35 williamc 1.4 $self->{docstore}=shift;
36 williamc 1.1 }
37 williamc 1.4 $self->appl();
38 williamc 1.1 }
39    
40 williamc 1.3 sub newtestdoc {
41 williamc 1.1 my $self=shift;
42     $self->{object}=$self->{appl}->activatedoc(@_);
43 williamc 1.4 $self->{inttest}{"new"}++;
44     }
45    
46     sub docstore {
47     my $self=shift;
48     if ( ! defined $self->{docstore} ) {
49     $self->{storedir}=$self->temparea()."/DocTester/".$self->newfilename();
50     $self->{docstore}=ActiveDoc::ActiveConfig->new($self->{storedir});
51     }
52     return $self->{docstore};
53     }
54    
55     sub appl {
56     my $self=shift;
57     if ( ! defined $self->{appl} ) {
58     my $doc=$self->docstore();
59     $self->{appl}=ActiveDoc::Application->new($doc);
60    
61     }
62     return $self->{appl};
63 williamc 1.1 }
64    
65     sub options {
66     my $self=shift;
67 williamc 1.4 $self->appl()->options(@_);
68 williamc 1.1 }
69    
70 williamc 1.5 sub setoption {
71 williamc 1.1 my $self=shift;
72 williamc 1.5 $self->appl()->setoption(@_);
73 williamc 1.2 }
74    
75 williamc 1.4 sub userinterface {
76 williamc 1.2 my $self=shift;
77 williamc 1.4 $self->{appl}->userinterface(@_);
78 williamc 1.1 }