import SOAP-WSDL 1.27 from CPAN

git-cpan-module:   SOAP-WSDL
git-cpan-version:  1.27
git-cpan-authorid: MKUTTER
git-cpan-file:     authors/id/M/MK/MKUTTER/SOAP-WSDL-1.27.tar.gz
This commit is contained in:
Martin Kutter
2009-12-12 19:48:16 -08:00
committed by Michael G. Schwern
parent 7ca2154ad6
commit 2bad767211
389 changed files with 2374 additions and 28345 deletions
-48
View File
@@ -1,48 +0,0 @@
#!/usr/bin/perl
use Test::More qw(no_plan);
use strict;
use lib 'lib/';
use lib '../lib/';
use lib 't/lib';
use Storable;
use_ok qw(SOAP::WSDL::XSD::Typelib::ComplexType);
use_ok qw( MyComplexType );
# simple type derived from builtin via restriction
my $obj = MyComplexType->new({ MyTestName => 'test' });
ok $obj->isa('SOAP::WSDL::XSD::Typelib::Builtin::anyType')
, 'inherited class';
is $obj, '<MyTestName >test</MyTestName >', 'stringification';
$obj = MyComplexType->new({ MyTestName => [ 'test', 'test2' ] });
ok $obj->isa('SOAP::WSDL::XSD::Typelib::Builtin::anyType')
, 'inherited class';
is $obj, '<MyTestName >test</MyTestName ><MyTestName >test2</MyTestName >',
'stringification';
# try on the fly factory
@MyComplexType2::ISA = ('SOAP::WSDL::XSD::Typelib::ComplexType');
{
use Class::Std::Fast::Storable;
my %MyTestName_of;
MyComplexType2->_factory(
[ qw(MyTestName) ], # order
{ MyTestName => \%MyTestName_of }, # attribute lookup map
{ MyTestName => 'MyElement' } # class name lookup map
);
}
$obj = MyComplexType2->new({ MyTestName => [ 'test', 'test2' ] });
ok $obj->isa('SOAP::WSDL::XSD::Typelib::Builtin::anyType')
, 'inherited class (on the fly-factory object)';
is $obj, '<MyTestName >test</MyTestName><MyTestName >test2</MyTestName>',
'stringification (on the fly-factory object)';
# TODO factor out into complexType test
eval { $obj->get_ZUMSL };
like $@, qr{Valid\smethods}xm, 'error message (invalid method)';
__END__