Added test

git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/data-publishing/gcat-client@179524 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Luca Frosini 2019-05-23 09:36:05 +00:00
parent 60e4a983ef
commit 5326fad4d7
1 changed files with 25 additions and 0 deletions

View File

@ -46,6 +46,31 @@ public class ItemTest extends ContextTest {
private static final String ID_KEY = "id";
// @Test
public void deleteAllItems() throws Exception {
// ContextTest.setContext("");
/*
ObjectMapper mapper = new ObjectMapper();
JavaType listType = mapper.getTypeFactory().constructCollectionType(ArrayList.class, String.class);
Item item = new Item();
String itemsString = item.list(1000, 0);
logger.debug("Got items {}", itemsString);
List<String> items = mapper.readValue(itemsString, listType);
logger.debug("Going to purge {} items", items.size());
for(String name : items) {
logger.debug("Going to purge item with name : {}", name);
try {
item.purge(name);
}catch (Exception e) {
logger.error("Error while purging item with name {}", name, e);
}
}
*/
}
@Test
public void completeTest() throws IOException {
ObjectMapper mapper = new ObjectMapper();