Adding tests
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/information-system/resource-registry@130955 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
5a25dcac10
commit
2f56cd600e
|
@ -3,9 +3,9 @@
|
||||||
*/
|
*/
|
||||||
package org.gcube.informationsystem.resourceregistry.resources.impl;
|
package org.gcube.informationsystem.resourceregistry.resources.impl;
|
||||||
|
|
||||||
|
import org.gcube.informationsystem.model.embedded.AccessPolicy;
|
||||||
import org.gcube.informationsystem.model.entity.facet.ContactFacet;
|
import org.gcube.informationsystem.model.entity.facet.ContactFacet;
|
||||||
import org.gcube.informationsystem.model.entity.facet.LocationFacet;
|
import org.gcube.informationsystem.model.entity.resource.Actor;
|
||||||
import org.gcube.informationsystem.model.entity.facet.MemoryFacet;
|
|
||||||
import org.gcube.informationsystem.types.TypeBinder;
|
import org.gcube.informationsystem.types.TypeBinder;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
|
@ -19,30 +19,47 @@ public class SchemaManagementImplTest {
|
||||||
private static Logger logger = LoggerFactory.getLogger(SchemaManagementImplTest.class);
|
private static Logger logger = LoggerFactory.getLogger(SchemaManagementImplTest.class);
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void registerContactFacetEntity() throws Exception{
|
public void registerEmbeddedTypeSchema() throws Exception{
|
||||||
|
Class<?> clz = AccessPolicy.class;
|
||||||
|
String json = TypeBinder.serializeType(clz);
|
||||||
|
logger.trace(json);
|
||||||
|
//new SchemaManagementImpl().registerEmbeddedTypeSchema(json);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void getEmbeddedTypeSchema() throws Exception{
|
||||||
|
String json = new SchemaManagementImpl().getEmbeddedTypeSchema(AccessPolicy.NAME);
|
||||||
|
logger.trace(json);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void registerFacetSchema() throws Exception{
|
||||||
Class<?> clz = ContactFacet.class;
|
Class<?> clz = ContactFacet.class;
|
||||||
String json = TypeBinder.serializeType(clz);
|
String json = TypeBinder.serializeType(clz);
|
||||||
logger.trace(json);
|
logger.trace(json);
|
||||||
|
|
||||||
//new SchemaManagementImpl().registerFacetSchema(json);
|
//new SchemaManagementImpl().registerFacetSchema(json);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void registerLocationFacetEntity() throws Exception{
|
public void getFacetSchema() throws Exception{
|
||||||
Class<?> clz = LocationFacet.class;
|
String json = new SchemaManagementImpl().getFacetSchema(ContactFacet.NAME);
|
||||||
|
logger.trace(json);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void registerResourceSchema() throws Exception{
|
||||||
|
Class<?> clz = Actor.class;
|
||||||
String json = TypeBinder.serializeType(clz);
|
String json = TypeBinder.serializeType(clz);
|
||||||
logger.trace(json);
|
logger.trace(json);
|
||||||
|
|
||||||
//new SchemaManagementImpl().registerFacetSchema(json);
|
//new SchemaManagementImpl().registerFacetSchema(json);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void registerMemoryFacetEntity() throws Exception{
|
public void getResourceSchema() throws Exception{
|
||||||
Class<?> clz = MemoryFacet.class;
|
String json = new SchemaManagementImpl().getResourceSchema(Actor.NAME);
|
||||||
String json = TypeBinder.serializeType(clz);
|
|
||||||
logger.trace(json);
|
logger.trace(json);
|
||||||
|
|
||||||
//new SchemaManagementImpl().registerFacetSchema(json);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue