use Test::More tests => 5; use strict; use warnings; use_ok( 'HTTP::OAI' ); my $expected = < 0000-00-00T00:00:00Zhttp://localhost/path/scriptYou didn't supply a verb argument EOF my $r = HTTP::OAI::Response->new( requestURL=>'http://localhost/path/script?', responseDate=>'0000-00-00T00:00:00Z', ); $r->errors(HTTP::OAI::Error->new(code=>'badVerb',message=>'You didn\'t supply a verb argument')); is($r->toDOM->toString, $expected, 'badVerb'); $r = HTTP::OAI::Identify->new(); $r->parse_string("\n"); is($r->code, 600, 'Chunk xml'); $r = HTTP::OAI::Identify->new(); $r->parse_string($expected); ok($r->is_error, 'Parse_string'); my $err_noid = < 0000-00-00T00:00:00Zhttp://localhost/path/script?Requested identifier does not exist EOF $r = HTTP::OAI::GetRecord->new(); $r->parse_string($err_noid); ok($r->is_error);