rendered paste body#!perl -T
use Test::More qw(no_plan) ;
use OpenSRF::System;
use OpenILS::Application;
use OpenSRF::Application;
use OpenSRF::Utils::SettingsClient;
use OpenILS::Utils::Cronscript
my %defaults = (
'min=i' => 0, # keys are Getopt::Long style options
'max=i' => 999, # values are default values
'user=s' => 'admin',
'password=s' => '',
'nolockfile' => 1,
);
my $core = OpenILS::Utils::Cronscript->new(\%defaults);
my $opts = $core->MyGetOptions();
$core->bootstrap;
# bootstrapping
#my $session = OpenILS::Utils::Cronscript->new()->session('open-ils.acq');
#my $config = 'SYSCONFDIR/opensrf_core.xml';
#my $config = shift || die "bootstrap config required\n";
#OpenSRF::System->bootstrap_client( config_file => $config );
# Subroutines within the module
my @subs = (ils_version, get_idl_file, register_method, authoritative_wrapper);
#
# Test to see if we can see the subroutines
#
use_ok ( 'OpenILS::Application' , @subs);
#
# Testing subroutine: ils_version()
#
is( OpenILS::Application::ils_version(), '2-1-1', "Testing version");
# Testing subroutine: get_idl_file()
#
# Testing subroutine: register_method()
#
my $idl = OpenILS::Application::get_idl_file();
#$my = OpenSRF::Utils::SettingsClient->new->config_value('IDL');
#$my = OpenILS::Application::get_idl_file();
#isa( OpenILS::Application::get_idl_file(), $my, "testing");
#isa( OpenILS::Application::get_idl_file(), OpenSRF::Utils::SettingsClient->new->config_value('IDL'), "Testing subroutine: get_idl_file");