import SOAP-WSDL 2.00_24 from CPAN
git-cpan-module: SOAP-WSDL git-cpan-version: 2.00_24 git-cpan-authorid: MKUTTER git-cpan-file: authors/id/M/MK/MKUTTER/SOAP-WSDL-2.00_24.tar.gz
This commit is contained in:
committed by
Michael G. Schwern
parent
b955c5ad79
commit
84b53d9261
@@ -1,4 +1,4 @@
|
||||
use Test::More tests => 11;
|
||||
use Test::More tests => 13;
|
||||
use lib '../../../lib';
|
||||
use_ok qw(SOAP::WSDL::Deserializer::Hash);
|
||||
|
||||
@@ -13,9 +13,27 @@ is $data->{a}->{b}->[0], 1;
|
||||
is $data->{a}->{b}->[1], 2;
|
||||
is $data->{a}->{c}, 3;
|
||||
|
||||
ok $data = $deserializer->deserialize(q{<a><b><c>1</c></b><b><c>2</c></b></a>});
|
||||
# need 3 elements in array to trigger all branches...
|
||||
# need ignorable whitespace to trigger removal...
|
||||
ok $data = $deserializer->deserialize(
|
||||
q{<a>
|
||||
<b><c>1</c></b>
|
||||
<b><c>2</c></b>
|
||||
<b><c>3</c></b>
|
||||
</a>});
|
||||
is $data->{a}->{b}->[0]->{c}, 1;
|
||||
is $data->{a}->{b}->[1]->{c}, 2;
|
||||
|
||||
eval { $deserializer->deserialize('grzlmpfh') };
|
||||
ok $@->isa('SOAP::WSDL::SOAP::Typelib::Fault11');
|
||||
ok $@->isa('SOAP::WSDL::SOAP::Typelib::Fault11');
|
||||
|
||||
my $fault = $deserializer->generate_fault({
|
||||
message => 'Foo',
|
||||
code => 'Bar',
|
||||
role => 'mine',
|
||||
});
|
||||
|
||||
is $fault->get_faultstring(), 'Foo';
|
||||
|
||||
$fault = $deserializer->generate_fault({});
|
||||
is $fault->get_faultstring(), 'Unknown error';
|
||||
|
||||
Reference in New Issue
Block a user