Improved test

This commit is contained in:
luca.frosini 2023-10-30 17:47:03 +01:00
parent b17edcb160
commit 660f0ea4a5
1 changed files with 11 additions and 1 deletions

View File

@ -15,6 +15,7 @@ import org.gcube.informationsystem.base.reference.Direction;
import org.gcube.informationsystem.contexts.reference.entities.Context;
import org.gcube.informationsystem.contexts.reference.relations.IsParentOf;
import org.gcube.informationsystem.model.impl.properties.MetadataImpl;
import org.gcube.informationsystem.model.knowledge.ModelKnowledge;
import org.gcube.informationsystem.model.reference.ERElement;
import org.gcube.informationsystem.model.reference.entities.Resource;
import org.gcube.informationsystem.model.reference.properties.Metadata;
@ -25,6 +26,7 @@ import org.gcube.informationsystem.resourceregistry.api.exceptions.types.SchemaN
import org.gcube.informationsystem.serialization.ElementMapper;
import org.gcube.informationsystem.tree.Node;
import org.gcube.informationsystem.tree.Tree;
import org.gcube.informationsystem.types.knowledge.TypeInformation;
import org.gcube.informationsystem.types.reference.Type;
import org.gcube.informationsystem.utils.UUIDManager;
import org.gcube.informationsystem.utils.UUIDUtility;
@ -114,12 +116,20 @@ public class ResourceRegistryClientTest extends ContextTest {
@Test
public void testGetModelKnowledge() throws SchemaNotFoundException, ResourceRegistryException {
AccessType[] modelTypes = AccessType.getModelTypes();
ModelKnowledge<Type, TypeInformation> modelKnowledge = ((ResourceRegistryClientImpl) resourceRegistryClient).getModelKnowledge();
for(AccessType accessType : modelTypes) {
Tree<Type> tree = ((ResourceRegistryClientImpl) resourceRegistryClient).getModelKnowledge().getTree(accessType);
Tree<Type> tree = modelKnowledge.getTree(accessType);
logger.trace("{}", tree);
}
}
@Test
public void testGetResourceTree() throws SchemaNotFoundException, ResourceRegistryException {
Tree<Type> tree = ((ResourceRegistryClientImpl) resourceRegistryClient).getModelKnowledge().getTree(AccessType.RESOURCE);
logger.trace("{}", tree);
}
@Test
public void testGetNode() throws SchemaNotFoundException, ResourceRegistryException {