File: ComplexType.t

package info (click to toggle)
libsoap-wsdl-perl 3.004-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 2,600 kB
  • sloc: perl: 8,433; xml: 1,769; java: 19; makefile: 15
file content (22 lines) | stat: -rw-r--r-- 505 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
use strict;
use warnings;
use Test::More tests => 5; #qw(no_plan);

use_ok qw(SOAP::WSDL::XSD::ComplexType);

my $obj = SOAP::WSDL::XSD::ComplexType->new();
$obj->set_variety('extension');

eval { $obj->serialize('foo') };
like $@, qr{sorry, \s we \s just}xsm;

$obj->set_targetNamespace('bar');
ok $obj->set_abstract(1);
ok $obj->set_final(1);
eval {
    $obj->serialize(
        'foo', 'bar', { autotype => 1 , namespace => {} }
    )
};

like $@, qr{^No \s prefix \s found \s for \s namespace \s bar}x;