|
|
|
@ -2,7 +2,6 @@ package org.gcube.informationsystem.resourceregistry.schema;
|
|
|
|
|
|
|
|
|
|
import java.util.List;
|
|
|
|
|
|
|
|
|
|
import org.gcube.informationsystem.base.reference.ISManageable;
|
|
|
|
|
import org.gcube.informationsystem.model.reference.entities.Facet;
|
|
|
|
|
import org.gcube.informationsystem.types.TypeBinder;
|
|
|
|
|
import org.gcube.informationsystem.types.annotations.Abstract;
|
|
|
|
@ -26,11 +25,10 @@ public class ResourceRegistrySchemaClientTest extends ContextTest {
|
|
|
|
|
// @Test
|
|
|
|
|
public void testCreate() throws Exception {
|
|
|
|
|
ResourceRegistrySchemaClient resourceRegistrySchemaClient = ResourceRegistrySchemaClientFactory.create();
|
|
|
|
|
TypeDefinition<? extends ISManageable> td = resourceRegistrySchemaClient.create(AuxFacet.class);
|
|
|
|
|
TypeDefinition td = resourceRegistrySchemaClient.create(AuxFacet.class);
|
|
|
|
|
logger.debug("{}", td);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@SuppressWarnings({"rawtypes", "unchecked"})
|
|
|
|
|
@Test
|
|
|
|
|
public void testRead() throws Exception {
|
|
|
|
|
ResourceRegistrySchemaClient resourceRegistrySchemaClient = ResourceRegistrySchemaClientFactory.create();
|
|
|
|
@ -42,8 +40,8 @@ public class ResourceRegistrySchemaClientTest extends ContextTest {
|
|
|
|
|
|
|
|
|
|
types = resourceRegistrySchemaClient.read(Facet.class, false);
|
|
|
|
|
Assert.assertTrue(types.size()==1);
|
|
|
|
|
TypeDefinition<Facet> gotFacetDefinition = types.get(0);
|
|
|
|
|
TypeDefinition<Facet> facetDefinition = TypeBinder.createTypeDefinition(Facet.class);
|
|
|
|
|
TypeDefinition gotFacetDefinition = types.get(0);
|
|
|
|
|
TypeDefinition facetDefinition = TypeBinder.createTypeDefinition(Facet.class);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Assert.assertTrue(gotFacetDefinition.getName().compareTo(facetDefinition.getName())==0);
|
|
|
|
|