Fixing test

git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/private/luca.frosini/resource-registry-database-creator@176640 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Luca Frosini 2019-01-17 14:37:25 +00:00
parent 993c639e0b
commit babef7ffee
1 changed files with 7 additions and 1 deletions

View File

@ -1,6 +1,9 @@
package org.gcube.informationsystem.resourceregistry;
import java.util.ServiceLoader;
import org.gcube.informationsystem.model.impl.utils.discovery.ISMDiscovery;
import org.gcube.informationsystem.model.impl.utils.discovery.RegistrationProvider;
import org.gcube.informationsystem.model.impl.utils.discovery.SchemaAction;
import org.gcube.informationsystem.resourceregistry.dbinitialization.DatabaseEnvironment;
import org.gcube.informationsystem.resourceregistry.dbinitialization.SchemaActionImpl;
@ -21,7 +24,10 @@ public class DataBaseCreator {
@Test
public void createTypes() throws Exception {
SchemaAction schemaAction = new SchemaActionImpl();
ISMDiscovery.manageISM(schemaAction);
ServiceLoader<? extends RegistrationProvider> regsitrationProviders = ServiceLoader.load(RegistrationProvider.class);
for (RegistrationProvider registrationProvider : regsitrationProviders) {
ISMDiscovery.manageISM(schemaAction, registrationProvider.getPackagesToRegister());
}
}
}