Fixing Tests
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/data-publishing/document-store-lib-couchdb@122622 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
e67cbb01ce
commit
47eaef0493
|
@ -24,6 +24,7 @@ public class PersistenceCouchBaseTest {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testJsonNodeUsageRecordConversions() throws Exception {
|
public void testJsonNodeUsageRecordConversions() throws Exception {
|
||||||
|
ScopeProvider.instance.set("/gcube/devNext");
|
||||||
Record record = TestUsageRecord.createTestServiceUsageRecordAutomaticScope();
|
Record record = TestUsageRecord.createTestServiceUsageRecordAutomaticScope();
|
||||||
logger.debug("UsageRecord : {}", record.toString());
|
logger.debug("UsageRecord : {}", record.toString());
|
||||||
JsonNode node = PersistenceCouchDB.usageRecordToJsonNode(record);
|
JsonNode node = PersistenceCouchDB.usageRecordToJsonNode(record);
|
||||||
|
@ -33,6 +34,18 @@ public class PersistenceCouchBaseTest {
|
||||||
Assert.assertEquals(0, r.compareTo(record));
|
Assert.assertEquals(0, r.compareTo(record));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testJsonNodeUsageRecordConversionsWithNestedMap() throws Exception {
|
||||||
|
ScopeProvider.instance.set("/gcube/devNext");
|
||||||
|
Record record = TestUsageRecord.createTestTaskUsageRecordAutomaticScope();
|
||||||
|
logger.debug("UsageRecord : {}", record.toString());
|
||||||
|
JsonNode node = PersistenceCouchDB.usageRecordToJsonNode(record);
|
||||||
|
logger.debug("Node : {}", node.toString());
|
||||||
|
Record r = PersistenceCouchDB.jsonNodeToUsageRecord(node);
|
||||||
|
Assert.assertEquals(0, record.compareTo(r));
|
||||||
|
Assert.assertEquals(0, r.compareTo(record));
|
||||||
|
}
|
||||||
|
|
||||||
public void testProxyWithTestConfiguration() throws Exception{
|
public void testProxyWithTestConfiguration() throws Exception{
|
||||||
// Production-Preproduction Nodes
|
// Production-Preproduction Nodes
|
||||||
//URL url = new URL("http://accounting-d4s.d4science.org");
|
//URL url = new URL("http://accounting-d4s.d4science.org");
|
||||||
|
|
Reference in New Issue