43 lines
1.0 KiB
Java
43 lines
1.0 KiB
Java
package org.gcube.application;
|
|
|
|
import java.io.IOException;
|
|
import java.nio.file.Files;
|
|
import java.nio.file.Paths;
|
|
|
|
import org.gcube.application.geoportalcommon.MockDocumentConfigurationReader;
|
|
import org.gcube.application.geoportalcommon.geoportal.config.DocumentConfig;
|
|
import org.gcube.common.scope.api.ScopeProvider;
|
|
import org.junit.Test;
|
|
|
|
public class LoadDocumentConfiguration {
|
|
|
|
private static String TOKEN = "";
|
|
private static String CONTEXT = "/gcube/devsec/devVRE";
|
|
private static String USERNAME = "francesco.mangiacrapa";
|
|
|
|
// @Before
|
|
public void init() {
|
|
ScopeProvider.instance.set(CONTEXT);
|
|
}
|
|
|
|
@Test
|
|
public void loadDocumentConfiguration() throws Exception {
|
|
|
|
MockDocumentConfigurationReader mock = new MockDocumentConfigurationReader();
|
|
System.out.println(mock.getListDocumentConfig());
|
|
}
|
|
|
|
private static String readFile(String filePath) {
|
|
String content = "";
|
|
|
|
try {
|
|
content = new String(Files.readAllBytes(Paths.get(filePath)));
|
|
} catch (IOException e) {
|
|
e.printStackTrace();
|
|
}
|
|
|
|
return content;
|
|
}
|
|
|
|
}
|