File: PortType.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-- 889 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::Operation;
use_ok qw(SOAP::WSDL::PortType);

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


my $operation = $portType->find_operation('bar', 'foobar');
is $operation->get_name(), 'foobar', 'found operation';
$operation = $portType->find_operation('baz', 'foo');
is $operation->get_name(), 'foo', 'found operation';

$operation = $portType->find_operation('baz', 'foobar');
is $operation, undef, 'find_operation returns undef on unknown operation';