Fixing tests
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/private/luca.frosini/resource-registry-database-creator@177102 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
94b3abaade
commit
2734389b42
|
@ -32,7 +32,7 @@ public class ContextCreator extends ContextElaborator {
|
|||
|
||||
protected Context create(Context context) throws ResourceRegistryException, IOException {
|
||||
ContextManagement contextManagement = new ContextManagement();
|
||||
contextManagement.setJSON(ISMapper.marshal(context));
|
||||
contextManagement.setJson(ISMapper.marshal(context));
|
||||
String contextString = contextManagement.create();
|
||||
logger.info("Created {}", contextString);
|
||||
Context c = ISMapper.unmarshal(Context.class, contextString);
|
||||
|
|
|
@ -24,9 +24,9 @@ import org.slf4j.LoggerFactory;
|
|||
* @author Luca Frosini (ISTI - CNR)
|
||||
*
|
||||
*/
|
||||
public class ScopedTest {
|
||||
public class ContextTest {
|
||||
|
||||
private static final Logger logger = LoggerFactory.getLogger(ScopedTest.class);
|
||||
private static final Logger logger = LoggerFactory.getLogger(ContextTest.class);
|
||||
|
||||
protected static final String PROPERTIES_FILENAME = "token.properties";
|
||||
|
||||
|
@ -38,7 +38,7 @@ public class ScopedTest {
|
|||
|
||||
static {
|
||||
Properties properties = new Properties();
|
||||
InputStream input = ScopedTest.class.getClassLoader().getResourceAsStream(PROPERTIES_FILENAME);
|
||||
InputStream input = ContextTest.class.getClassLoader().getResourceAsStream(PROPERTIES_FILENAME);
|
||||
|
||||
try {
|
||||
// load the properties file
|
|
@ -33,7 +33,7 @@ public class DataBaseCreator {
|
|||
|
||||
protected Context create(Context context) throws ResourceRegistryException, IOException {
|
||||
ContextManagement contextManagement = new ContextManagement();
|
||||
contextManagement.setJSON(ISMapper.marshal(context));
|
||||
contextManagement.setJson(ISMapper.marshal(context));
|
||||
String contextString = contextManagement.create();
|
||||
logger.info("Created {}", contextString);
|
||||
Context c = ISMapper.unmarshal(Context.class, contextString);
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
package org.gcube.informationsystem.resourceregistry.context;
|
||||
|
||||
import org.gcube.informationsystem.resourceregistry.ScopedTest;
|
||||
import org.gcube.informationsystem.resourceregistry.ContextTest;
|
||||
import org.junit.Test;
|
||||
/*
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
*/
|
||||
|
||||
public class ContextManagementTest extends ScopedTest {
|
||||
public class ContextManagementTest extends ContextTest {
|
||||
|
||||
// private static Logger logger = LoggerFactory.getLogger(ContextManagementTest.class);
|
||||
|
||||
|
|
Loading…
Reference in New Issue