File: static.t

package info (click to toggle)
libmojo-rabbitmq-client-perl 0.3.1-3
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 308 kB
  • sloc: perl: 2,165; xml: 489; makefile: 2
file content (13 lines) | stat: -rw-r--r-- 620 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
use strict;
use Test::More tests => 5;
use Test::Exception;

use_ok 'Mojo::RabbitMQ::Client';

my $client = Mojo::RabbitMQ::Client->new();

throws_ok { $client->consumer() } qr/is a static method/, 'calling consumer on instance goes fatal';
throws_ok { $client->publisher() } qr/is a static method/, 'calling publisher on instance goes fatal';

lives_and { isa_ok Mojo::RabbitMQ::Client->consumer(), 'Mojo::RabbitMQ::Client::Consumer' }, 'called consumer on package, should live';
lives_and { isa_ok Mojo::RabbitMQ::Client->publisher(), 'Mojo::RabbitMQ::Client::Publisher' }, 'called publisher on package, should live';