2 #===============================================================================
11 # AUTHOR: Chris Cormack (rangi), chrisc@catalyst.net.nz
12 # ORGANIZATION: Koha Development Team
14 # CREATED: 18/09/13 09:59:01
16 #===============================================================================
22 use Test::More tests => 7; # last test to print
27 ok( my $ncip = NCIP->new('t/config_sample'), 'Create new object' );
30 <?xml version="1.0" encoding="UTF-8"?>
32 ns1:version="http://www.niso.org/schemas/ncip/v2_0/imp1/xsd/ncip_v2_0.xsd" xmlns:ns1="http://www.niso.org/2008/ncip">
36 ok( my $response = $ncip->process_request($xml), 'Process a request' );
45 # handle_initiation is called as part of the process_request, but best to test
47 ok( !$ncip->handle_initiation($xmlbad), 'Bad xml' );
48 ok( $ncip->handle_initiation($xml), 'Good XML' );
50 my $lookupitem = read_file('t/sample_data/LookupItem.xml');
52 ok( my $response = $ncip->process_request($lookupitem), 'Try looking up an item');
53 is ($response, 'LookupItem', 'We got lookupitem');