Refactoring code

This commit is contained in:
Luca Frosini 2023-01-03 11:21:48 +01:00
parent ebc6cef52d
commit 61a6a7260e
7 changed files with 13 additions and 12 deletions

View File

@ -1,11 +1,11 @@
package org.gcube.common.zenodo;
package org.gcube.common.deposition;
import java.io.File;
import java.net.URL;
import org.gcube.com.fasterxml.jackson.databind.ObjectMapper;
import org.gcube.common.zenodo.model.Deposition;
import org.gcube.common.zenodo.model.DepositionVersion;
import org.gcube.common.deposition.model.Deposition;
import org.gcube.common.deposition.model.DepositionVersion;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

View File

@ -1,4 +1,4 @@
package org.gcube.common.zenodo;
package org.gcube.common.deposition;
public class ElaborateDepositionFile {

View File

@ -1,6 +1,6 @@
package org.gcube.common.zenodo;
package org.gcube.common.deposition;
import org.gcube.common.zenodo.model.DepositionVersion;
import org.gcube.common.deposition.model.DepositionVersion;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

View File

@ -1,4 +1,4 @@
package org.gcube.common.zenodo.model;
package org.gcube.common.deposition.model;
import java.util.List;

View File

@ -1,4 +1,4 @@
package org.gcube.common.zenodo.model;
package org.gcube.common.deposition.model;
import java.net.MalformedURLException;
import java.net.URL;

View File

@ -1,4 +1,4 @@
package org.gcube.common.zenodo.model;
package org.gcube.common.deposition.model;
import java.net.MalformedURLException;
import java.net.URL;

View File

@ -6,12 +6,13 @@ import java.io.InputStream;
import java.net.URL;
import java.util.Properties;
import org.gcube.common.deposition.ElaborateDeposition;
import org.junit.Test;
/**
* @author Luca Frosini (ISTI - CNR)
*/
public class ZenodoDepositTest {
public class DepositTest {
protected static Properties properties;
protected static final String PROPERTIES_FILENAME = "zenodo.properties";
@ -20,7 +21,7 @@ public class ZenodoDepositTest {
static {
properties = new Properties();
InputStream input = ZenodoDepositTest.class.getClassLoader().getResourceAsStream(PROPERTIES_FILENAME);
InputStream input = DepositTest.class.getClassLoader().getResourceAsStream(PROPERTIES_FILENAME);
try {
// load the properties file
@ -31,7 +32,7 @@ public class ZenodoDepositTest {
}
public File getZenodoDepositFile() throws Exception {
URL jsonFileURL = ZenodoDepositTest.class.getClassLoader().getResource(ZENODO_DEPOSIT_JSON_FILENAME);
URL jsonFileURL = DepositTest.class.getClassLoader().getResource(ZENODO_DEPOSIT_JSON_FILENAME);
File jsonFile = new File(jsonFileURL.toURI());
return jsonFile;
}