use strict; use warnings; use Test::More tests => 9; use Test::Exception; use SRU::Utils::XMLTest; use_ok( 'SRU::Response::Record' ); BAD_CONSTRUCT: { ## missing recordSchema and recordData throws_ok { SRU::Response::Record->new() } qr/must supply recordSchema/, 'must supply recordData and recordSchema'; ## missing recordData throws_ok { SRU::Response::Record->new( recordSchema => 'foo' ) } qr/must supply recordData/, 'must supply recordData'; ## missing recordSchema throws_ok { SRU::Response::Record->new( recordData => 'foo' ) } qr/must supply recordSchema/, 'must supply recordSchema'; } OK_CONSTRUCT: { my $xml = "