Data::Domain::Net::IPAddress::IPv4_TEST - Test companion class for the IPv4 address data domain class


Data-Domain-Net documentation Contained in the Data-Domain-Net distribution.

Index


Code Index:

NAME

Top

Data::Domain::Net::IPAddress::IPv4_TEST - Test companion class for the IPv4 address data domain class

VERSION

Top

version 1.100840

DESCRIPTION

Top

Test companion class for Data::Domain::Net::IPAddress::IPv4. Gets its test data from Data::Semantic::Net::IPAddress::TestData::IPv4.

INSTALLATION

Top

See perlmodinstall for information and options on installing Perl modules.

BUGS AND LIMITATIONS

Top

No bugs have been reported.

Please report any bugs or feature requests through the web interface at http://rt.cpan.org/Public/Dist/Display.html?Name=Data-Domain-Net.

AVAILABILITY

Top

The latest version of this module is available from the Comprehensive Perl Archive Network (CPAN). Visit http://www.perl.com/CPAN/ to find a CPAN site near you, or see http://search.cpan.org/dist/Data-Domain-Net/.

The development version lives at http://github.com/hanekomu/Data-Domain-Net/. Instead of sending patches, please fork this project using the standard git and github infrastructure.

AUTHOR

Top

  Marcel Gruenauer <marcel@cpan.org>

COPYRIGHT AND LICENSE

Top


Data-Domain-Net documentation Contained in the Data-Domain-Net distribution.

use 5.008;
use strict;
use warnings;

package Data::Domain::Net::IPAddress::IPv4_TEST;
our $VERSION = '1.100840';
# ABSTRACT: Test companion class for the IPv4 address data domain class
use Data::Domain::Net ':all';
use Test::More;
use parent qw(
  Data::Domain::SemanticAdapter::Test
  Data::Semantic::Net::IPAddress::TestData::IPv4
);
use constant PLAN => 5;

sub run {
    my $self = shift;
    $self->SUPER::run(@_);
    my $domain = IPv4();
    isa_ok($domain,          'Data::Domain::Net::IPAddress::IPv4');
    isa_ok($domain,          'Data::Domain::SemanticAdapter');
    isa_ok($domain->adaptee, 'Data::Semantic::Net::IPAddress::IPv4');
    my $domain2 = IPv4(-not_in => [qw(212.186.17.4 212.186.17.5)]);
    $self->is_excluded($domain2, '212.186.17.4');
    $self->is_valid($domain2, '212.186.17.6');
}
1;


__END__