ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/COMP/SCRAM/src/ActiveDoc/DocTester.pm
Revision: 1.5
Committed: Wed Feb 23 14:54:01 2000 UTC (25 years, 2 months ago) by williamc
Content type: text/plain
Branch: MAIN
CVS Tags: v102p1, V1_0_1, V1_0_0, V1_pre0, SCRAM_V1, SCRAMV1_IMPORT, V0_19_7, V0_19_6, V0_19_6p1, V0_19_5, SFATEST, V0_19_4, V0_19_4_pre3, V0_19_4_pre2, V0_19_4_pre1, V0_19_3, V0_19_2, V0_19_1, V0_19_0, V0_18_5, V0_18_4, V_18_3_TEST, VO_18_3, V0_18_2, V0_18_1, ProtoEnd
Branch point for: V1_pre1, SCRAM_V1_BRANCH, V0_19_4_B
Changes since 1.4: +2 -2 lines
Log Message:
bring in line

File Contents

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