resource-registry-client/src/test/java/org/gcube/informationsystem/resourceregistry/client/proxy/ResourceRegistryClientTest....

51 lines
1.3 KiB
Java

/**
*
*/
package org.gcube.informationsystem.resourceregistry.client.proxy;
import org.gcube.common.scope.api.ScopeProvider;
import org.gcube.informationsystem.resourceregistry.api.exceptions.InvalidQueryException;
import org.gcube.informationsystem.resourceregistry.api.exceptions.schema.SchemaNotFoundException;
import org.junit.Before;
import org.junit.Test;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
* @author Luca Frosini (ISTI - CNR)
*
*/
public class ResourceRegistryClientTest {
private static Logger logger = LoggerFactory
.getLogger(ResourceRegistryClientTest.class);
protected ResourceRegistryClient resourceRegistryClient;
@Before
public void before(){
ScopeProvider.instance.set("/gcube/devNext/NextNext");
resourceRegistryClient = ResourceRegistryClientFactory.create();
}
@Test
public void testQuery() throws InvalidQueryException{
String res = resourceRegistryClient.query("SELECT FROM V", 0, null);
logger.trace(res);
}
@Test
public void testGetFacetSchema() throws SchemaNotFoundException {
String res = resourceRegistryClient.getFacetSchema("ContactFacet");
logger.trace(res);
}
@Test
public void testGetResourceSchema() throws SchemaNotFoundException {
String res = resourceRegistryClient.getResourceSchema("HostingNode");
logger.trace(res);
}
}