Skip to content
Fetching contributors…
Cannot retrieve contributors at this time
45 lines (32 sloc) 1010 Bytes
use strict;
use warnings;
use Test::More qw( no_plan );
use Test::Exception;
# synchronizes the {error,standard} output of this test.
use IO::Handle;
our $class;
BEGIN { $class = 'Net::Whois::Object::Response'; use_ok $class; }
our %tested;
my @lines = <DATA>;
our $object = ( Net::Whois::Object->new(@lines) )[0];
isa_ok $object, $class;
# Non-inherited methods
can_ok $object, qw( response );
# Check if typed attributes are correct
can_ok $object, $object->attributes('mandatory');
# Test 'response'
is( $object->response(), 'ERROR:101:', 'response properly parsed' );
# Test 'comment'
is_deeply( $object->comment(), [ '', 'No entries found in source TEST.' ], 'comment properly parsed' );
# Common tests
do 't/';
ok( $tested{common_loaded}, "t/ properly loaded" );
ok( !$@, "Can evaluate t/ ($@)" );
%ERROR:101: no entries found
% No entries found in source TEST.
Something went wrong with that request. Please try again.