ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/COMP/SCRAM/src/BuildSystem/test/test_Tool.pm
Revision: 1.1.2.2.2.1
Committed: Fri Aug 11 13:47:36 2000 UTC (24 years, 9 months ago) by williamc
Content type: text/plain
Branch: HPWbranch
Changes since 1.1.2.2: +9 -0 lines
Log Message:
Add url test

File Contents

# User Rev Content
1 williamc 1.1.2.1 #
2     # Tool.pm test suite
3     #
4    
5     package BuildSystem::test::test_Tool;
6     require 5.001;
7     use BuildSystem::Tool;
8    
9     @ISA = ("Utilities::TestClass"); #methods both from the test class
10    
11     sub init {
12     my $self=shift;
13     $self->{testfile}=$self->datadir()."/SimpleDocTest";
14     }
15    
16     sub test {
17     my $self=shift;
18     $self->newtest("Initiation test");
19     $self->newobject();
20     $self->testinterface("name","testname");
21     $self->testinterface("version","V1");
22     $self->_testgeneral();
23    
24     $self->newtest("Feature Testing");
25     $self->testinterface("addfeature","testfeature1","testvalue1" );
26     $self->testinterface("addfeature","testfeature2","testvalue2" );
27     $self->testinterface("addfeature","testfeature3","testvalue3" );
28     $self->testinterface("type","testfeature2","typeA" );
29     $self->testinterface("type","testfeature3","typeA" );
30     $self->_testfeature();
31    
32 williamc 1.1.2.2.2.1 $self->newtest("url testing");
33     $self->testinterface("url",$self->{testfile});
34     $self->expect($self->{testfile});
35     $self->testinterface("url");
36     $self->clearexpect();
37    
38 williamc 1.1.2.1
39     $self->newtest("Persistency Testing");
40     my $savefile=$self->temparea()."/".$self->newfilename();
41     $self->testinterface("store",$savefile);
42     undef $self->{object};
43     $self->newobject();
44     $self->testinterface("restore",$savefile);
45     $self->_testgeneral();
46     $self->_testfeature();
47 williamc 1.1.2.2.2.1 $self->expect($self->{testfile});
48     $self->testinterface("url");
49     $self->clearexpect();
50 williamc 1.1.2.2
51     $self->newtest("Type listing test");
52     $self->expect("testfeature2","testfeature3");
53     $self->testinterface("listtype","typeA");
54     $self->clearexpect();
55 williamc 1.1.2.1 }
56    
57     sub _testgeneral {
58     my $self=shift;
59     $self->expect("testname");
60     $self->testinterface("name");
61     $self->clearexpect();
62     $self->expect("V1");
63     $self->testinterface("version");
64     $self->clearexpect();
65     }
66    
67     sub _testfeature {
68     my $self=shift;
69     $self->expect("testvalue1");
70     $self->testinterface("getfeature","testfeature1" );
71     $self->clearexpect();
72     $self->expect("testvalue2");
73     $self->testinterface("getfeature","testfeature2" );
74     $self->clearexpect();
75     $self->expect("typeA");
76     $self->testinterface("type","testfeature2","typeA" );
77     $self->clearexpect();
78     }