commented junit tests

git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/data-catalogue/ckan-util-library@179738 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Francesco Mangiacrapa 2019-06-07 16:27:21 +00:00
parent 6d7d329091
commit f5877e49e1
1 changed files with 41 additions and 0 deletions

View File

@ -15,10 +15,13 @@ import org.gcube.datacatalogue.ckanutillibrary.shared.CKanUserWrapper;
import org.gcube.datacatalogue.ckanutillibrary.shared.CkanDatasetRelationship;
import org.gcube.datacatalogue.ckanutillibrary.shared.DatasetRelationships;
import org.gcube.datacatalogue.ckanutillibrary.shared.RolesCkanGroupOrOrg;
import org.junit.Before;
import org.junit.Test;
import org.slf4j.LoggerFactory;
import eu.trentorise.opendata.jackan.CheckedCkanClient;
import eu.trentorise.opendata.jackan.model.CkanDataset;
import eu.trentorise.opendata.jackan.model.CkanGroup;
import eu.trentorise.opendata.jackan.model.CkanOrganization;
import eu.trentorise.opendata.jackan.model.CkanResource;
import eu.trentorise.opendata.jackan.model.CkanUser;
@ -63,6 +66,44 @@ public class TestDataCatalogueLib {
logger.debug("Landing pages " + utils.getLandingPages());
}
//@Test
public void getOrganizationForName() throws Exception{
String orgName = "nextnext";
DataCatalogueImpl utils = factory.getUtilsPerScope(scope);
CkanOrganization org = utils.getOrganizationByName(orgName);
logger.debug("The "+CkanOrganization.class.getSimpleName()+" is: "+org.getName());
logger.debug("LandingPages of "+CkanOrganization.class.getSimpleName()+" for name " + utils.getLandingPages());
if(org.getUsers()!=null) {
for (CkanUser user : org.getUsers()) {
logger.debug("User: "+user.getName());
}
}
}
//@Test
public void getGroupForName() throws Exception{
String groupName = "ariadne";
DataCatalogueImpl utils = factory.getUtilsPerScope(scope);
CkanGroup org = utils.getGroupByName(groupName);
logger.debug("The "+CkanGroup.class.getSimpleName()+" is: "+org.getName());
logger.debug("LandingPages of "+CkanGroup.class.getSimpleName()+" for name " + utils.getLandingPages());
if(org.getUsers()!=null) {
for (CkanUser user : org.getUsers()) {
logger.debug("User: "+user.getName());
}
}
}
//@Test
public void getDatasetIdsFromDB() throws Exception{