1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
|
use lib 't/lib', 'lib';
use strict;
use Test::More tests => 4;
use Graphics::Primitive::Component;
use Graphics::Primitive::Container;
BEGIN {
use_ok('Graphics::Primitive::Driver');
use_ok('DummyDriver');
}
my $driver = DummyDriver->new;
isa_ok($driver, 'DummyDriver');
my $container = Graphics::Primitive::Container->new;
my $comp = Graphics::Primitive::Component->new;
$container->add_component($comp, 'c');
$driver->prepare($container);
$driver->finalize($container);
$driver->draw($container);
cmp_ok($driver->draw_component_called, '==', 2, 'component draws');
|