maint: remove Travis stuff which has been replaced with Github actions (#325)
[bioperl-live.git] / t / Ontology / RelationshipType.t
blobbc32d81c1206655e5f2136cb2875e892f7d73974
1 # -*-Perl-*- Test Harness script for Bioperl
2 # $Id$
4 use strict;
6 BEGIN {
7     use Bio::Root::Test;
8     
9     test_begin(-tests => 23,
10                -requires_module => 'Graph::Directed');
11         
12     use_ok('Bio::Ontology::RelationshipType');
13     use_ok('Bio::Ontology::Ontology');
16 my $ont = Bio::Ontology::Ontology->new(-name => "relationship type");
17   
18 my $IS_A     = Bio::Ontology::RelationshipType->get_instance("IS_A", $ont);
19 my $PART_OF  = Bio::Ontology::RelationshipType->get_instance("PART_OF", $ont);
20 my $CONTAINS = Bio::Ontology::RelationshipType->get_instance("CONTAINS", $ont);
21 my $FOUND_IN = Bio::Ontology::RelationshipType->get_instance("FOUND_IN", $ont);
22 my $IS_A2    = Bio::Ontology::RelationshipType->get_instance("IS_A", $ont);
24 isa_ok($IS_A, "Bio::Ontology::RelationshipType");
25 isa_ok($IS_A, "Bio::Ontology::TermI");
28 ok( ! $IS_A->equals( $PART_OF ) );
29 ok( $IS_A->equals( $IS_A2 ) );
30 ok( $PART_OF->equals( $PART_OF ) );
33 is( $IS_A->identifier(), undef ); # don't make up identifiers
34 is( $IS_A->name(), "IS_A" );
35 is( $IS_A->definition(), "IS_A relationship predicate (type)" );
36 is( $IS_A->ontology()->name(), "relationship type" );
39 is( $PART_OF->identifier(), undef ); # don't make up identifiers
40 is( $PART_OF->name(), "PART_OF" );
41 is( $PART_OF->definition(), "PART_OF relationship predicate (type)" );
42 is( $PART_OF->ontology()->name(), "relationship type" );
45 is( $CONTAINS->identifier(), undef ); # don't make up identifiers
46 is( $CONTAINS->name(), "CONTAINS" );
47 is( $CONTAINS->definition(), "CONTAINS relationship predicate (type)" );
48 is( $CONTAINS->ontology()->name(), "relationship type" );
51 is( $FOUND_IN->identifier(), undef ); # don't make up identifiers
52 is( $FOUND_IN->name(), "FOUND_IN" );
53 is( $FOUND_IN->definition(), "FOUND_IN relationship predicate (type)" );
54 is( $FOUND_IN->ontology()->name(), "relationship type" );