1 |
#
|
2 |
# TreeNode test suite
|
3 |
#
|
4 |
|
5 |
package test_TreeNode;
|
6 |
require 5.001;
|
7 |
use ActiveDoc::TreeNode;
|
8 |
@ISA = ("TestClass"); #methods both from the test class
|
9 |
|
10 |
sub init {
|
11 |
my $self=shift;
|
12 |
}
|
13 |
|
14 |
sub test {
|
15 |
my $self=shift;
|
16 |
$self->{expectedstring}="";
|
17 |
|
18 |
$self->newtest("Make a Node");
|
19 |
$self->newobject("test home");
|
20 |
$self->expect("test home");
|
21 |
$self->testinterface("name");
|
22 |
$self->clearexpect();
|
23 |
|
24 |
$self->newtest("Try and find the same node");
|
25 |
|
26 |
$this=$self->testinterface("find", "test home");
|
27 |
$self->testfail("Unable to find self")
|
28 |
if ( $this->name() ne "test home" );
|
29 |
$self->newtest("Find Non-existent node test");
|
30 |
$self->expect("");
|
31 |
$self->testinterface("find", "test fail");
|
32 |
$self->clearexpect();
|
33 |
}
|