view Lib/IMPL/Test/HarnessRunner.pm @ 175:9057e4b95d10

corrected cloning method
author sourcer
date Wed, 05 Oct 2011 00:48:43 +0300
parents 4267a2ac3d46
children d1676be8afcc
line wrap: on
line source

package IMPL::Test::HarnessRunner;
use strict;
use warnings;

use parent qw(IMPL::Object IMPL::Object::Autofill IMPL::Object::Serializable);
use IMPL::Class::Property;
use Test::Harness;

__PACKAGE__->PassThroughArgs;

BEGIN {
    public property Strap => prop_all;
}

sub CTOR {
    my $this = shift;
    
    die new IMPL::InvalidArgumentException("The Strap parameter must be specified") unless $this->Strap;
}

sub RunTests {
    my ($this,@files) = @_;
    
    local $Test::Harness::Strap = $this->Strap;
    
    return runtests(@files);
}

sub ExecuteTests {
    my ($this,%args) = @_;
    
    local $Test::Harness::Strap = $this->Strap;
    
    return Test::Harness::execute_tests(%args);
}

1;