Bio-MAGE

 view release on metacpan or  search on metacpan

t/StandardQuantitationType.t  view on Meta::CPAN

    and scalar @{$standardquantitationtype->getQuantitationTypeMaps} == 0),
   'setQuantitationTypeMaps accepts empty array ref');


# test getQuantitationTypeMaps throws exception with argument
eval {$standardquantitationtype->getQuantitationTypeMaps(1)};
ok($@, 'getQuantitationTypeMaps throws exception with argument');

# test setQuantitationTypeMaps throws exception with no argument
eval {$standardquantitationtype->setQuantitationTypeMaps()};
ok($@, 'setQuantitationTypeMaps throws exception with no argument');

# test setQuantitationTypeMaps throws exception with too many argument
eval {$standardquantitationtype->setQuantitationTypeMaps(1,2)};
ok($@, 'setQuantitationTypeMaps throws exception with too many argument');

# test setQuantitationTypeMaps accepts undef
eval {$standardquantitationtype->setQuantitationTypeMaps(undef)};
ok((!$@ and not defined $standardquantitationtype->getQuantitationTypeMaps()),
   'setQuantitationTypeMaps accepts undef');

# test the meta-data for the assoication
$assn = $assns{quantitationTypeMaps};
isa_ok($assn, 'Bio::MAGE::Association');
$end = $assn->other();
isa_ok($end, 'Bio::MAGE::Association::End');
ok((defined $end
   and defined $end->documentation(),
   and defined $end->cardinality(),
   and grep {$_ eq $end->cardinality} ('0..1','1','1..N','0..N'),
   and defined $end->is_ref(),
   and ($end->is_ref() == 0 or $end->is_ref() == 1),
   and defined $end->rank(),
   and $end->rank(),
   and defined $end->ordered(),
   and ($end->ordered() == 0 or $end->ordered() == 1),
   and defined $end->class_name(),
   and $end->class_name(),
   and defined $end->name(),
   and $end->name()),
   'quantitationTypeMaps->other() is a valid Bio::MAGE::Association::End'
  );

$end = $assn->self();
isa_ok($end, 'Bio::MAGE::Association::End');
ok((defined $end
   and defined $end->documentation(),
   and defined $end->cardinality(),
   and grep {$_ eq $end->cardinality} ('0..1','1','1..N','0..N'),
   and defined $end->is_ref(),
   and ($end->is_ref() == 0 or $end->is_ref() == 1),
   and defined $end->class_name(),
   and $end->class_name()),
   'quantitationTypeMaps->self() is a valid Bio::MAGE::Association::End'
  );




# create a subclass
my $derivedsignal = Bio::MAGE::QuantitationType::DerivedSignal->new();

# testing subclass DerivedSignal
isa_ok($derivedsignal, q[Bio::MAGE::QuantitationType::DerivedSignal]);
isa_ok($derivedsignal, q[Bio::MAGE::QuantitationType::StandardQuantitationType]);


# create a subclass
my $measuredsignal = Bio::MAGE::QuantitationType::MeasuredSignal->new();

# testing subclass MeasuredSignal
isa_ok($measuredsignal, q[Bio::MAGE::QuantitationType::MeasuredSignal]);
isa_ok($measuredsignal, q[Bio::MAGE::QuantitationType::StandardQuantitationType]);


# create a subclass
my $ratio = Bio::MAGE::QuantitationType::Ratio->new();

# testing subclass Ratio
isa_ok($ratio, q[Bio::MAGE::QuantitationType::Ratio]);
isa_ok($ratio, q[Bio::MAGE::QuantitationType::StandardQuantitationType]);


# create a subclass
my $confidenceindicator = Bio::MAGE::QuantitationType::ConfidenceIndicator->new();

# testing subclass ConfidenceIndicator
isa_ok($confidenceindicator, q[Bio::MAGE::QuantitationType::ConfidenceIndicator]);
isa_ok($confidenceindicator, q[Bio::MAGE::QuantitationType::StandardQuantitationType]);


# create a subclass
my $presentabsent = Bio::MAGE::QuantitationType::PresentAbsent->new();

# testing subclass PresentAbsent
isa_ok($presentabsent, q[Bio::MAGE::QuantitationType::PresentAbsent]);
isa_ok($presentabsent, q[Bio::MAGE::QuantitationType::StandardQuantitationType]);


# create a subclass
my $failed = Bio::MAGE::QuantitationType::Failed->new();

# testing subclass Failed
isa_ok($failed, q[Bio::MAGE::QuantitationType::Failed]);
isa_ok($failed, q[Bio::MAGE::QuantitationType::StandardQuantitationType]);



my $quantitationtype;
{
  # silence the abstract class warnings
  local $SIG{__WARN__} = sub {'IGNORE'};

  # create a superclass
  $quantitationtype = Bio::MAGE::QuantitationType::QuantitationType->new();
}

# testing superclass QuantitationType
isa_ok($quantitationtype, q[Bio::MAGE::QuantitationType::QuantitationType]);
isa_ok($standardquantitationtype, q[Bio::MAGE::QuantitationType::QuantitationType]);



( run in 0.698 second using v1.01-cache-2.11-cpan-71847e10f99 )