2 use Test::More tests => 3;
8 use_ok('Net::DBus::Binding::Introspector');
9 use_ok('Net::DBus::Object');
12 my $bus = Net::DBus->test;
13 my $service = $bus->export_service("/org/cpan/Net/DBus/Test/introspect");
15 my $object = Net::DBus::Object->new($service, "/org/example/Object/OtherObject");
17 my $introspector = $object->_introspector;
19 my $xml_got = $introspector->format($object);
21 my $xml_expect = <<EOF;
22 <!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN"
23 "http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd">
24 <node name="/org/example/Object/OtherObject">
25 <interface name="org.freedesktop.DBus.Introspectable">
26 <method name="Introspect">
27 <arg type="s" direction="out"/>
30 <interface name="org.freedesktop.DBus.Properties">
32 <arg type="s" direction="in"/>
33 <arg type="s" direction="in"/>
34 <arg type="v" direction="out"/>
36 <method name="GetAll">
37 <arg type="s" direction="in"/>
38 <arg type="a{sv}" direction="out"/>
41 <arg type="s" direction="in"/>
42 <arg type="s" direction="in"/>
43 <arg type="v" direction="in"/>
49 is($xml_got, $xml_expect, "xml data matches");