Refs #10804: Add possibility to marshal/unmarshall list and array of Records
Task-Url: https://support.d4science.org/issues/10804 git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/accounting/accounting-lib@161874 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
a4e29701d6
commit
fb8af136a9
|
@ -3,7 +3,9 @@
|
|||
*/
|
||||
package org.gcube.accounting.datamodel.usagerecords;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
import org.gcube.accounting.datamodel.UsageRecord;
|
||||
|
@ -85,6 +87,16 @@ public class ServiceUsageRecordTest extends ScopedTest {
|
|||
AggregatedServiceUsageRecord aggregatedUsageRecord = (AggregatedServiceUsageRecord) AggregationScheduler.getAggregatedRecord(usageRecord);
|
||||
logger.debug(DSMapper.marshal(aggregatedUsageRecord));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testListMarshalling() throws Exception {
|
||||
ServiceUsageRecord usageRecord = TestUsageRecord.createTestServiceUsageRecord();
|
||||
AggregatedServiceUsageRecord aggregatedUsageRecord = (AggregatedServiceUsageRecord) AggregationScheduler.getAggregatedRecord(usageRecord);
|
||||
List<UsageRecord> list = new ArrayList<>();
|
||||
list.add(aggregatedUsageRecord);
|
||||
logger.debug(DSMapper.marshal(list));
|
||||
}
|
||||
|
||||
|
||||
@Test
|
||||
public void testDeserialization() throws Exception{
|
||||
|
|
Loading…
Reference in New Issue