forked from D-Net/dnet-hadoop
last wrong assert fixed
This commit is contained in:
parent
71ef7d9e66
commit
fcabee9242
|
@ -12,7 +12,6 @@ import org.junit.jupiter.api.Disabled;
|
||||||
import org.junit.jupiter.api.Test;
|
import org.junit.jupiter.api.Test;
|
||||||
|
|
||||||
import eu.dnetlib.dhp.oa.graph.dump.gcat.GCatAPIClient;
|
import eu.dnetlib.dhp.oa.graph.dump.gcat.GCatAPIClient;
|
||||||
import sun.jvm.hotspot.utilities.Assert;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* NEVER EVER ENABLE THIS CLASS UNLESS YOU ABSOLUTELY KNOW WHAT YOU ARE DOING: with the proper parameters set it can
|
* NEVER EVER ENABLE THIS CLASS UNLESS YOU ABSOLUTELY KNOW WHAT YOU ARE DOING: with the proper parameters set it can
|
||||||
|
@ -44,14 +43,11 @@ public class GCatAPIClientTest {
|
||||||
String json = IOUtils
|
String json = IOUtils
|
||||||
.toString(getClass().getResourceAsStream("/eu/dnetlib/dhp/oa/graph/dump/gcat/gcat_pub.json"));
|
.toString(getClass().getResourceAsStream("/eu/dnetlib/dhp/oa/graph/dump/gcat/gcat_pub.json"));
|
||||||
System.out.println("Creating item...");
|
System.out.println("Creating item...");
|
||||||
Assert.that(client.publish(json) == HttpStatus.SC_CREATED, "Item not created");
|
Assertions.assertEquals(HttpStatus.SC_CREATED, client.publish(json));
|
||||||
System.out.println("item created, now listing...");
|
System.out.println("item created, now listing...");
|
||||||
Assert.that(client.list(0, 10).size() == 1, "List has more elements than expected");
|
Assertions.assertEquals(1, client.list(0, 10).size());
|
||||||
// and then drop it
|
// and then drop it
|
||||||
Assert
|
Assertions.assertTrue(client.purge(objidentifier));
|
||||||
.that(
|
|
||||||
client.purge(objidentifier),
|
|
||||||
"It should return true! I just created item with name from " + objidentifier);
|
|
||||||
System.out.println("item purged");
|
System.out.println("item purged");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue