1#!perl -T
2
3use Test::More qw(no_plan); ## no critic(ProhibitNoPlan)
4use Device::USB;
5use strict;
6use warnings;
7
8#
9# No plan, because the number of tests depends on the number of
10#  busses and devices on the system.
11#
12
13my $usb = Device::USB->new();
14
15ok( defined $usb, "Object successfully created" );
16can_ok( $usb, "get_busses" );
17
18$usb->find_busses();
19$usb->find_devices();
20
21my $busses = $usb->get_busses();
22ok( defined $busses, "USB busses found" );
23
24isa_ok( $busses, "ARRAY", "An array of busses returned." );
25
26foreach my $bus (@{$busses})
27{
28    isa_ok( $bus, "Device::USB::Bus" );
29}
30