BEGIN { $| = 1;
print
"1..31\n"
; }
END {
print
"not ok 1\n"
unless
$loaded
;}
$loaded
= 1;
$i
= 1;
result(
$i
);
my
$zonegroup
;
{
local
$SIG
{__WARN__} =
sub
{
'IGNORE'
};
$zonegroup
= Bio::MAGE::ArrayDesign::ZoneGroup->new();
}
result(
$zonegroup
->isa(
'Bio::MAGE::ArrayDesign::ZoneGroup'
));
result(
$zonegroup
->
package
() eq
q[ArrayDesign]
);
result(
$zonegroup
->class_name() eq
q[Bio::MAGE::ArrayDesign::ZoneGroup]
);
{
local
$SIG
{__WARN__} =
sub
{
'IGNORE'
};
$zonegroup
= Bio::MAGE::ArrayDesign::ZoneGroup->new(
zonesPerY
=> 1,
zonesPerX
=> 2,
spacingsBetweenZonesX
=> 3,
spacingsBetweenZonesY
=> 4);
}
result (
$zonegroup
->getZonesPerY() == 1);
$zonegroup
->setZonesPerY(1);
result (
$zonegroup
->getZonesPerY() == 1);
result (
$zonegroup
->getZonesPerX() == 2);
$zonegroup
->setZonesPerX(2);
result (
$zonegroup
->getZonesPerX() == 2);
result (
$zonegroup
->getSpacingsBetweenZonesX() == 3);
$zonegroup
->setSpacingsBetweenZonesX(3);
result (
$zonegroup
->getSpacingsBetweenZonesX() == 3);
result (
$zonegroup
->getSpacingsBetweenZonesY() == 4);
$zonegroup
->setSpacingsBetweenZonesY(4);
result (
$zonegroup
->getSpacingsBetweenZonesY() == 4);
my
%assns
= Bio::MAGE::ArrayDesign::ZoneGroup->associations();
my
$assn
;
{
local
$SIG
{__WARN__} =
sub
{
'IGNORE'
};
$zonegroup
= Bio::MAGE::ArrayDesign::ZoneGroup->new(
zoneLayout
=> Bio::MAGE::ArrayDesign::ZoneLayout->new(),
distanceUnit
=> Bio::MAGE::Measurement::DistanceUnit->new(),
zoneLocations
=> [Bio::MAGE::ArrayDesign::Zone->new()],
propertySets
=> [Bio::MAGE::NameValueType->new()]);
}
my
$zonelayout_assn
;
{
local
$SIG
{__WARN__} =
sub
{
'IGNORE'
};
$zonelayout_assn
= Bio::MAGE::ArrayDesign::ZoneLayout->new();
}
result (UNIVERSAL::isa(
$zonegroup
->getZoneLayout,
q[Bio::MAGE::ArrayDesign::ZoneLayout]
));
result (
$zonegroup
->setZoneLayout(
$zonelayout_assn
) ==
$zonelayout_assn
);
result (
$zonegroup
->getZoneLayout() ==
$zonelayout_assn
);
(
$assn
) =
$assns
{zoneLayout};
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
$distanceunit_assn
;
{
local
$SIG
{__WARN__} =
sub
{
'IGNORE'
};
$distanceunit_assn
= Bio::MAGE::Measurement::DistanceUnit->new();
}
result (UNIVERSAL::isa(
$zonegroup
->getDistanceUnit,
q[Bio::MAGE::Measurement::DistanceUnit]
));
result (
$zonegroup
->setDistanceUnit(
$distanceunit_assn
) ==
$distanceunit_assn
);
result (
$zonegroup
->getDistanceUnit() ==
$distanceunit_assn
);
(
$assn
) =
$assns
{distanceUnit};
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
$zonelocations_assn
;
{
local
$SIG
{__WARN__} =
sub
{
'IGNORE'
};
$zonelocations_assn
= Bio::MAGE::ArrayDesign::Zone->new();
}
result (UNIVERSAL::isa(
$zonegroup
->getZoneLocations->[0],
q[Bio::MAGE::ArrayDesign::Zone]
));
result (
$zonegroup
->setZoneLocations([
$zonelocations_assn
]));
result (UNIVERSAL::isa(
$zonegroup
->getZoneLocations,
'ARRAY'
)
and
scalar
@{
$zonegroup
->getZoneLocations()} == 1
and
$zonegroup
->getZoneLocations->[0] ==
$zonelocations_assn
);
$zonegroup
->addZoneLocations(
$zonelocations_assn
);
result (UNIVERSAL::isa(
$zonegroup
->getZoneLocations,
'ARRAY'
)
and
scalar
@{
$zonegroup
->getZoneLocations()} == 2
and
$zonegroup
->getZoneLocations->[0] ==
$zonelocations_assn
and
$zonegroup
->getZoneLocations->[1] ==
$zonelocations_assn
);
(
$assn
) =
$assns
{zoneLocations};
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(
$zonegroup
->getPropertySets->[0],
q[Bio::MAGE::NameValueType]
));
result (
$zonegroup
->setPropertySets([
$propertysets_assn
]));
result (UNIVERSAL::isa(
$zonegroup
->getPropertySets,
'ARRAY'
)
and
scalar
@{
$zonegroup
->getPropertySets()} == 1
and
$zonegroup
->getPropertySets->[0] ==
$propertysets_assn
);
$zonegroup
->addPropertySets(
$propertysets_assn
);
result (UNIVERSAL::isa(
$zonegroup
->getPropertySets,
'ARRAY'
)
and
scalar
@{
$zonegroup
->getPropertySets()} == 2
and
$zonegroup
->getPropertySets->[0] ==
$propertysets_assn
and
$zonegroup
->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 (
$zonegroup
->isa(
q[Bio::MAGE::Extendable]
));