context-enumeration/src/test/java/org/gcube/context/names/TestContextList.java

37 lines
861 B
Java

package org.gcube.context.names;
import java.io.File;
import java.util.Map;
import org.gcube.context.authorization.TokensUtil;
import org.junit.Test;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
public class TestContextList extends ContextTest {
private static final Logger logger = LoggerFactory.getLogger(TokensUtil.class);
@Test
public void test() throws Exception {
File src = new File("src");
File test = new File(src, "test");
File resources = new File(test, "resources");
File outputFile = new File(resources, "output.txt");
outputFile.delete();
ContextList contextList = new ContextList(outputFile);
contextList.all();
}
@Test
public void generateTokens() throws Exception {
Map<String, String> tokens = TokensUtil.getTokenForContexts("luca.frosini", "gCat");
logger.debug("{}", tokens);
}
}