In order to solve this problem, I incorporated the following into a test script:
{
# The code braces here are designed to limit
# variable scope for some nasty, internal object
# method testing - Overt your eyes children before
# it takes on its devil form!
my $obj = bless [ undef, 0, [] ], 'My::Class';
.
.
}
Where the blessed array reference is the same as that blessed in the class constructor. This alternate constructor subsequently allowed the desired testing of internal methods using the $obj object.
Mock Objects (Score:1)
See also MockObject [c2.com].
-Dom
Re:Mock Objects (Score:1)
Re:Mock Objects (Score:1)
This unfortunately was not the aim of my testing - With the code that I am testing, the standard class constructor builds a very complex queue of child objects from an XML configuration - By default, the enqueue and dequeue methods are