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:
parent
60e4a983ef
commit
5326fad4d7
|
@ -46,6 +46,31 @@ public class ItemTest extends ContextTest {
|
||||||
|
|
||||||
private static final String ID_KEY = "id";
|
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
|
@Test
|
||||||
public void completeTest() throws IOException {
|
public void completeTest() throws IOException {
|
||||||
ObjectMapper mapper = new ObjectMapper();
|
ObjectMapper mapper = new ObjectMapper();
|
||||||
|
|
Loading…
Reference in New Issue