1 |
williamc |
1.1.2.1 |
#
|
2 |
|
|
# Requirements.pm test suite
|
3 |
|
|
#
|
4 |
|
|
|
5 |
|
|
package BuildSystem::test::test_Requirements;
|
6 |
|
|
require 5.001;
|
7 |
|
|
use BuildSystem::Requirements;
|
8 |
williamc |
1.1.2.1.2.1 |
use URL::URLcache;
|
9 |
williamc |
1.1.2.1 |
|
10 |
|
|
@ISA=qw(Utilities::TestClass); #methods both from the test class
|
11 |
|
|
|
12 |
|
|
sub init {
|
13 |
|
|
my $self=shift;
|
14 |
|
|
$self->{testfile}=$self->datadir()."/RequirementsDocTest";
|
15 |
|
|
|
16 |
|
|
# make a dummy toolbox
|
17 |
|
|
$self->{toolbox}=$self;
|
18 |
williamc |
1.1.2.1.2.1 |
$self->{cachedir}=$self->temparea()."/RequirementsTest/cache";
|
19 |
|
|
$self->{cache}=URL::URLcache->new($self->{cachedir});
|
20 |
williamc |
1.1.2.1 |
}
|
21 |
|
|
|
22 |
|
|
sub test {
|
23 |
|
|
my $self=shift;
|
24 |
|
|
$self->newtest("Initiation test");
|
25 |
williamc |
1.1.2.1.2.1 |
$self->newobject($self->{testfile}, $self->{cache});
|
26 |
williamc |
1.1.2.1 |
|
27 |
williamc |
1.1.2.1.2.1 |
$self->newtest("Download test");
|
28 |
|
|
$self->testinterface("download");
|
29 |
|
|
|
30 |
williamc |
1.1.2.1 |
$self->newtest("Setup Testing");
|
31 |
|
|
$self->testinterface("setup",$self);
|
32 |
williamc |
1.1.2.1.2.1 |
$self->cmparray($self->{toolsetups},"test");
|
33 |
|
|
|
34 |
|
|
$self->newtest("URL Test");
|
35 |
|
|
$self->expect("cvs://cmscvs.cern.ch/cvs_server/repositories/SCRAM?auth=pserver&module=test/testtool&passkey=AA_:yZZ3e&user=anonymous&version=A");
|
36 |
|
|
$self->testinterface("url","test");
|
37 |
|
|
$self->clearexpect();
|
38 |
williamc |
1.1.2.1 |
}
|
39 |
|
|
|
40 |
|
|
# --- stubs
|
41 |
|
|
sub toolsetup {
|
42 |
|
|
my $self=shift;
|
43 |
|
|
push @{$self->{toolsetups}}, shift;
|
44 |
|
|
}
|