File: Definitions.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 (32 lines) | stat: -rw-r--r-- 838 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
23
24
25
26
27
28
29
30
31
32
use strict;
use warnings;
use Test::More tests => 4;

use SOAP::WSDL::PortType;
use_ok qw(SOAP::WSDL::Definitions);

my $obj = SOAP::WSDL::Definitions->new({
    portType => [
        SOAP::WSDL::PortType->new({
            name => 'foo',
            targetNamespace => 'bar',
        }),
        SOAP::WSDL::PortType->new({
            name => 'foo',
            targetNamespace => 'baz',
        }),
        SOAP::WSDL::PortType->new({
            name => 'foobar',
            targetNamespace => 'bar',
        }),
    ]
});


my $found= $obj->find_portType('bar', 'foobar');
is $found->get_name(), 'foobar', 'found PortType';
$found = $obj->find_portType('baz', 'foo');
is $found->get_name(), 'foo', 'found PortType';

$found = $obj->find_portType('baz', 'foobar');
is $found, undef, 'find_PortType returns undef on unknown PortType';