BEGIN { $| = 1;
print
"1..56\n"
; }
END {
print
"not ok 1\n"
unless
$loaded
;}
$loaded
= 1;
$i
= 1;
result(
$i
);
my
$presentabsent
;
{
local
$SIG
{__WARN__} =
sub
{
'IGNORE'
};
$presentabsent
= Bio::MAGE::QuantitationType::PresentAbsent->new();
}
result(
$presentabsent
->isa(
'Bio::MAGE::QuantitationType::PresentAbsent'
));
result(
$presentabsent
->
package
() eq
q[QuantitationType]
);
result(
$presentabsent
->class_name() eq
q[Bio::MAGE::QuantitationType::PresentAbsent]
);
{
local
$SIG
{__WARN__} =
sub
{
'IGNORE'
};
$presentabsent
= Bio::MAGE::QuantitationType::PresentAbsent->new(
isBackground
=> 1,
identifier
=> 2,
name
=> 3);
}
result (
$presentabsent
->getIsBackground() == 1);
$presentabsent
->setIsBackground(1);
result (
$presentabsent
->getIsBackground() == 1);
result (
$presentabsent
->getIdentifier() == 2);
$presentabsent
->setIdentifier(2);
result (
$presentabsent
->getIdentifier() == 2);
result (
$presentabsent
->getName() == 3);
$presentabsent
->setName(3);
result (
$presentabsent
->getName() == 3);
my
%assns
= Bio::MAGE::QuantitationType::PresentAbsent->associations();
my
$assn
;
{
local
$SIG
{__WARN__} =
sub
{
'IGNORE'
};
$presentabsent
= Bio::MAGE::QuantitationType::PresentAbsent->new(
channel
=> Bio::MAGE::BioAssay::Channel->new(),
quantitationTypeMaps
=> [Bio::MAGE::BioAssayData::QuantitationTypeMap->new()],
dataType
=> Bio::MAGE::Description::OntologyEntry->new(),
scale
=> Bio::MAGE::Description::OntologyEntry->new(),
confidenceIndicators
=> [Bio::MAGE::QuantitationType::ConfidenceIndicator->new()],
security
=> Bio::MAGE::AuditAndSecurity::Security->new(),
auditTrail
=> [Bio::MAGE::AuditAndSecurity::Audit->new()],
descriptions
=> [Bio::MAGE::Description::Description->new()],
propertySets
=> [Bio::MAGE::NameValueType->new()]);
}
my
$channel_assn
;
{
local
$SIG
{__WARN__} =
sub
{
'IGNORE'
};
$channel_assn
= Bio::MAGE::BioAssay::Channel->new();
}
result (UNIVERSAL::isa(
$presentabsent
->getChannel,
q[Bio::MAGE::BioAssay::Channel]
));
result (
$presentabsent
->setChannel(
$channel_assn
) ==
$channel_assn
);
result (
$presentabsent
->getChannel() ==
$channel_assn
);
(
$assn
) =
$assns
{channel};
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
$quantitationtypemaps_assn
;
{
local
$SIG
{__WARN__} =
sub
{
'IGNORE'
};
$quantitationtypemaps_assn
= Bio::MAGE::BioAssayData::QuantitationTypeMap->new();
}
result (UNIVERSAL::isa(
$presentabsent
->getQuantitationTypeMaps->[0],
q[Bio::MAGE::BioAssayData::QuantitationTypeMap]
));
result (
$presentabsent
->setQuantitationTypeMaps([
$quantitationtypemaps_assn
]));
result (UNIVERSAL::isa(
$presentabsent
->getQuantitationTypeMaps,
'ARRAY'
)
and
scalar
@{
$presentabsent
->getQuantitationTypeMaps()} == 1
and
$presentabsent
->getQuantitationTypeMaps->[0] ==
$quantitationtypemaps_assn
);
$presentabsent
->addQuantitationTypeMaps(
$quantitationtypemaps_assn
);
result (UNIVERSAL::isa(
$presentabsent
->getQuantitationTypeMaps,
'ARRAY'
)
and
scalar
@{
$presentabsent
->getQuantitationTypeMaps()} == 2
and
$presentabsent
->getQuantitationTypeMaps->[0] ==
$quantitationtypemaps_assn
and
$presentabsent
->getQuantitationTypeMaps->[1] ==
$quantitationtypemaps_assn
);
(
$assn
) =
$assns
{quantitationTypeMaps};
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
$datatype_assn
;
{
local
$SIG
{__WARN__} =
sub
{
'IGNORE'
};
$datatype_assn
= Bio::MAGE::Description::OntologyEntry->new();
}
result (UNIVERSAL::isa(
$presentabsent
->getDataType,
q[Bio::MAGE::Description::OntologyEntry]
));
result (
$presentabsent
->setDataType(
$datatype_assn
) ==
$datatype_assn
);
result (
$presentabsent
->getDataType() ==
$datatype_assn
);
(
$assn
) =
$assns
{dataType};
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
$scale_assn
;
{
local
$SIG
{__WARN__} =
sub
{
'IGNORE'
};
$scale_assn
= Bio::MAGE::Description::OntologyEntry->new();
}
result (UNIVERSAL::isa(
$presentabsent
->getScale,
q[Bio::MAGE::Description::OntologyEntry]
));
result (
$presentabsent
->setScale(
$scale_assn
) ==
$scale_assn
);
result (
$presentabsent
->getScale() ==
$scale_assn
);
(
$assn
) =
$assns
{scale};
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
$confidenceindicators_assn
;
{
local
$SIG
{__WARN__} =
sub
{
'IGNORE'
};
$confidenceindicators_assn
= Bio::MAGE::QuantitationType::ConfidenceIndicator->new();
}
result (UNIVERSAL::isa(
$presentabsent
->getConfidenceIndicators->[0],
q[Bio::MAGE::QuantitationType::ConfidenceIndicator]
));
result (
$presentabsent
->setConfidenceIndicators([
$confidenceindicators_assn
]));
result (UNIVERSAL::isa(
$presentabsent
->getConfidenceIndicators,
'ARRAY'
)
and
scalar
@{
$presentabsent
->getConfidenceIndicators()} == 1
and
$presentabsent
->getConfidenceIndicators->[0] ==
$confidenceindicators_assn
);
$presentabsent
->addConfidenceIndicators(
$confidenceindicators_assn
);
result (UNIVERSAL::isa(
$presentabsent
->getConfidenceIndicators,
'ARRAY'
)
and
scalar
@{
$presentabsent
->getConfidenceIndicators()} == 2
and
$presentabsent
->getConfidenceIndicators->[0] ==
$confidenceindicators_assn
and
$presentabsent
->getConfidenceIndicators->[1] ==
$confidenceindicators_assn
);
(
$assn
) =
$assns
{confidenceIndicators};
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
$security_assn
;
{
local
$SIG
{__WARN__} =
sub
{
'IGNORE'
};
$security_assn
= Bio::MAGE::AuditAndSecurity::Security->new();
}
result (UNIVERSAL::isa(
$presentabsent
->getSecurity,
q[Bio::MAGE::AuditAndSecurity::Security]
));
result (
$presentabsent
->setSecurity(
$security_assn
) ==
$security_assn
);
result (
$presentabsent
->getSecurity() ==
$security_assn
);
(
$assn
) =
$assns
{security};
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
$audittrail_assn
;
{
local
$SIG
{__WARN__} =
sub
{
'IGNORE'
};
$audittrail_assn
= Bio::MAGE::AuditAndSecurity::Audit->new();
}
result (UNIVERSAL::isa(
$presentabsent
->getAuditTrail->[0],
q[Bio::MAGE::AuditAndSecurity::Audit]
));
result (
$presentabsent
->setAuditTrail([
$audittrail_assn
]));
result (UNIVERSAL::isa(
$presentabsent
->getAuditTrail,
'ARRAY'
)
and
scalar
@{
$presentabsent
->getAuditTrail()} == 1
and
$presentabsent
->getAuditTrail->[0] ==
$audittrail_assn
);
$presentabsent
->addAuditTrail(
$audittrail_assn
);
result (UNIVERSAL::isa(
$presentabsent
->getAuditTrail,
'ARRAY'
)
and
scalar
@{
$presentabsent
->getAuditTrail()} == 2
and
$presentabsent
->getAuditTrail->[0] ==
$audittrail_assn
and
$presentabsent
->getAuditTrail->[1] ==
$audittrail_assn
);
(
$assn
) =
$assns
{auditTrail};
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
$descriptions_assn
;
{
local
$SIG
{__WARN__} =
sub
{
'IGNORE'
};
$descriptions_assn
= Bio::MAGE::Description::Description->new();
}
result (UNIVERSAL::isa(
$presentabsent
->getDescriptions->[0],
q[Bio::MAGE::Description::Description]
));
result (
$presentabsent
->setDescriptions([
$descriptions_assn
]));
result (UNIVERSAL::isa(
$presentabsent
->getDescriptions,
'ARRAY'
)
and
scalar
@{
$presentabsent
->getDescriptions()} == 1
and
$presentabsent
->getDescriptions->[0] ==
$descriptions_assn
);
$presentabsent
->addDescriptions(
$descriptions_assn
);
result (UNIVERSAL::isa(
$presentabsent
->getDescriptions,
'ARRAY'
)
and
scalar
@{
$presentabsent
->getDescriptions()} == 2
and
$presentabsent
->getDescriptions->[0] ==
$descriptions_assn
and
$presentabsent
->getDescriptions->[1] ==
$descriptions_assn
);
(
$assn
) =
$assns
{descriptions};
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(
$presentabsent
->getPropertySets->[0],
q[Bio::MAGE::NameValueType]
));
result (
$presentabsent
->setPropertySets([
$propertysets_assn
]));
result (UNIVERSAL::isa(
$presentabsent
->getPropertySets,
'ARRAY'
)
and
scalar
@{
$presentabsent
->getPropertySets()} == 1
and
$presentabsent
->getPropertySets->[0] ==
$propertysets_assn
);
$presentabsent
->addPropertySets(
$propertysets_assn
);
result (UNIVERSAL::isa(
$presentabsent
->getPropertySets,
'ARRAY'
)
and
scalar
@{
$presentabsent
->getPropertySets()} == 2
and
$presentabsent
->getPropertySets->[0] ==
$propertysets_assn
and
$presentabsent
->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 (
$presentabsent
->isa(
q[Bio::MAGE::QuantitationType::StandardQuantitationType]
));
result (
$presentabsent
->isa(
q[Bio::MAGE::QuantitationType::QuantitationType]
));
result (
$presentabsent
->isa(
q[Bio::MAGE::Identifiable]
));
result (
$presentabsent
->isa(
q[Bio::MAGE::Describable]
));
result (
$presentabsent
->isa(
q[Bio::MAGE::Extendable]
));