BEGIN {
my
$missing_modules
=
<<CLIENT_ONLY;
It appears you are missing one or more modules required to host
your own MOBY Central registry (these are primarily required
for connecting to a database).
Most likely, you are interested in building a client-side application,
in which case this doesn't matter, and you should ignore this test.
Other tests should still pass - if not, you need to resolve them.
On the other hand, if you want to build your own local MOBY Central registry,
you should install the missing modules, and re-run the tests.
CLIENT_ONLY
$ENV
{MOBY_CENTRAL_CONFIG} =
"./t/mobycentral.config"
;
require_ok(
"DBI"
) or diag(
$missing_modules
);
require_ok(
"DBD::mysql"
) or diag(
$missing_modules
);
use_ok(
'MOBY::Central'
) or diag(
"Did you get 'MOBY::Central'? I can' find it."
)
};
END {};
my
@API
=
qw/Registration
registerObjectClass _registerObjectPayload
deregisterObjectClass _deregisterObjectPayload
_testObjectTypeAgainstPrimitives
registerServiceType _registerServiceTypePayload
deregisterServiceType _deregisterServiceTypePayload
retrieveNamespaces _registerNamespacePayload
deregisterNamespace _deregisterNamespacePayload
registerService _registerServicePayload
_getServiceInstanceRDF _registerArticles
deregisterService _deregisterServicePayload
findService _findServicePayload
_extractObjectTypes registerServiceWSDL
_extract_ids
_searchForServicesWithArticle _searchForSimple _searchForCollection
_extractObjectTypesAndNamespaces
retrieveService _retrieveServicePayload
retrieveResourceURLs retrieveServiceProviders retrieveServiceNames
retrieveServiceTypes retrieveRelationshipTypes retrieveObjectNames
retrieveObjectDefinition retrieveNamespaces
retrieveObject _retrieveObjectPayload
Relationships DUMP_MySQL _ISAPayload/
;
can_ok(
"MOBY::Central"
,
@API
)
or diag(
"MOBY::Central failed to implement full API"
);
my
%Obj
= (
objectType
=>
"Rubbish"
,
description
=>
"a human-readable description of the object"
,
contactEmail
=>
'your@email.address'
,
authURI
=>
"test.suite.com"
,
Relationships
=> {
ISA
=> [
[
'Object'
,
'article1'
],
[
'Object'
,
'articleName2'
]],
HASA
=> [
[
'Object'
,
'articleName3'
]]
}
);