BEGIN { $| = 1;
print
"1..21\n"
; }
END {
print
"not ok 1\n"
unless
$loaded
;}
$loaded
= 1;
$i
= 1;
result(
$i
);
my
$seqfeaturelocation
;
{
local
$SIG
{__WARN__} =
sub
{
'IGNORE'
};
$seqfeaturelocation
= Bio::MAGE::BioSequence::SeqFeatureLocation->new();
}
result(
$seqfeaturelocation
->isa(
'Bio::MAGE::BioSequence::SeqFeatureLocation'
));
result(
$seqfeaturelocation
->
package
() eq
q[BioSequence]
);
result(
$seqfeaturelocation
->class_name() eq
q[Bio::MAGE::BioSequence::SeqFeatureLocation]
);
{
local
$SIG
{__WARN__} =
sub
{
'IGNORE'
};
$seqfeaturelocation
= Bio::MAGE::BioSequence::SeqFeatureLocation->new(
strandType
=> 1);
}
result (
$seqfeaturelocation
->getStrandType() == 1);
$seqfeaturelocation
->setStrandType(1);
result (
$seqfeaturelocation
->getStrandType() == 1);
my
%assns
= Bio::MAGE::BioSequence::SeqFeatureLocation->associations();
my
$assn
;
{
local
$SIG
{__WARN__} =
sub
{
'IGNORE'
};
$seqfeaturelocation
= Bio::MAGE::BioSequence::SeqFeatureLocation->new(
coordinate
=> Bio::MAGE::BioSequence::SequencePosition->new(),
subregions
=> [Bio::MAGE::BioSequence::SeqFeatureLocation->new()],
propertySets
=> [Bio::MAGE::NameValueType->new()]);
}
my
$coordinate_assn
;
{
local
$SIG
{__WARN__} =
sub
{
'IGNORE'
};
$coordinate_assn
= Bio::MAGE::BioSequence::SequencePosition->new();
}
result (UNIVERSAL::isa(
$seqfeaturelocation
->getCoordinate,
q[Bio::MAGE::BioSequence::SequencePosition]
));
result (
$seqfeaturelocation
->setCoordinate(
$coordinate_assn
) ==
$coordinate_assn
);
result (
$seqfeaturelocation
->getCoordinate() ==
$coordinate_assn
);
(
$assn
) =
$assns
{coordinate};
result(is_object(
$assn
)
and
$assn
->isa(
'Bio::MAGE::Association'
)
and
defined
$assn
->description(),
and
defined
$assn
->cardinality(),
and
grep
{
$_
eq
$assn
->cardinality} (
'0..1'
,
'1'
,
'1..N'
,
'0..N'
),
and
defined
$assn
->is_ref(),
and (
$assn
->is_ref() == 0 or
$assn
->is_ref() == 1),
and
defined
$assn
->rank(),
and
$assn
->rank(),
and
defined
$assn
->ordered(),
and (
$assn
->ordered() == 0 or
$assn
->ordered() == 1),
and
defined
$assn
->class_name(),
and
$assn
->class_name(),
and
defined
$assn
->name(),
and
$assn
->name(),
);
my
$subregions_assn
;
{
local
$SIG
{__WARN__} =
sub
{
'IGNORE'
};
$subregions_assn
= Bio::MAGE::BioSequence::SeqFeatureLocation->new();
}
result (UNIVERSAL::isa(
$seqfeaturelocation
->getSubregions->[0],
q[Bio::MAGE::BioSequence::SeqFeatureLocation]
));
result (
$seqfeaturelocation
->setSubregions([
$subregions_assn
]));
result (UNIVERSAL::isa(
$seqfeaturelocation
->getSubregions,
'ARRAY'
)
and
scalar
@{
$seqfeaturelocation
->getSubregions()} == 1
and
$seqfeaturelocation
->getSubregions->[0] ==
$subregions_assn
);
$seqfeaturelocation
->addSubregions(
$subregions_assn
);
result (UNIVERSAL::isa(
$seqfeaturelocation
->getSubregions,
'ARRAY'
)
and
scalar
@{
$seqfeaturelocation
->getSubregions()} == 2
and
$seqfeaturelocation
->getSubregions->[0] ==
$subregions_assn
and
$seqfeaturelocation
->getSubregions->[1] ==
$subregions_assn
);
(
$assn
) =
$assns
{subregions};
result(is_object(
$assn
)
and
$assn
->isa(
'Bio::MAGE::Association'
)
and
defined
$assn
->description(),
and
defined
$assn
->cardinality(),
and
grep
{
$_
eq
$assn
->cardinality} (
'0..1'
,
'1'
,
'1..N'
,
'0..N'
),
and
defined
$assn
->is_ref(),
and (
$assn
->is_ref() == 0 or
$assn
->is_ref() == 1),
and
defined
$assn
->rank(),
and
$assn
->rank(),
and
defined
$assn
->ordered(),
and (
$assn
->ordered() == 0 or
$assn
->ordered() == 1),
and
defined
$assn
->class_name(),
and
$assn
->class_name(),
and
defined
$assn
->name(),
and
$assn
->name(),
);
my
$propertysets_assn
;
{
local
$SIG
{__WARN__} =
sub
{
'IGNORE'
};
$propertysets_assn
= Bio::MAGE::NameValueType->new();
}
result (UNIVERSAL::isa(
$seqfeaturelocation
->getPropertySets->[0],
q[Bio::MAGE::NameValueType]
));
result (
$seqfeaturelocation
->setPropertySets([
$propertysets_assn
]));
result (UNIVERSAL::isa(
$seqfeaturelocation
->getPropertySets,
'ARRAY'
)
and
scalar
@{
$seqfeaturelocation
->getPropertySets()} == 1
and
$seqfeaturelocation
->getPropertySets->[0] ==
$propertysets_assn
);
$seqfeaturelocation
->addPropertySets(
$propertysets_assn
);
result (UNIVERSAL::isa(
$seqfeaturelocation
->getPropertySets,
'ARRAY'
)
and
scalar
@{
$seqfeaturelocation
->getPropertySets()} == 2
and
$seqfeaturelocation
->getPropertySets->[0] ==
$propertysets_assn
and
$seqfeaturelocation
->getPropertySets->[1] ==
$propertysets_assn
);
(
$assn
) =
$assns
{propertySets};
result(is_object(
$assn
)
and
$assn
->isa(
'Bio::MAGE::Association'
)
and
defined
$assn
->description(),
and
defined
$assn
->cardinality(),
and
grep
{
$_
eq
$assn
->cardinality} (
'0..1'
,
'1'
,
'1..N'
,
'0..N'
),
and
defined
$assn
->is_ref(),
and (
$assn
->is_ref() == 0 or
$assn
->is_ref() == 1),
and
defined
$assn
->rank(),
and
$assn
->rank(),
and
defined
$assn
->ordered(),
and (
$assn
->ordered() == 0 or
$assn
->ordered() == 1),
and
defined
$assn
->class_name(),
and
$assn
->class_name(),
and
defined
$assn
->name(),
and
$assn
->name(),
);
result (
$seqfeaturelocation
->isa(
q[Bio::MAGE::Extendable]
));