refs #200: Create accouting-lib library
https://support.d4science.org/issues/200 Fixing tests git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/accounting/accounting-lib@115779 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
5bfc630489
commit
7d69ed0851
|
@ -1,7 +1,7 @@
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
package org.gcube.accounting.testutility;
|
package org.gcube.accounting.datamodel.basetypes;
|
||||||
|
|
||||||
import java.net.URI;
|
import java.net.URI;
|
||||||
import java.net.URISyntaxException;
|
import java.net.URISyntaxException;
|
||||||
|
@ -10,8 +10,6 @@ import org.gcube.accounting.datamodel.UsageRecord.OperationResult;
|
||||||
import org.gcube.accounting.datamodel.usagerecords.JobUsageRecord;
|
import org.gcube.accounting.datamodel.usagerecords.JobUsageRecord;
|
||||||
import org.gcube.accounting.datamodel.usagerecords.ServiceUsageRecord;
|
import org.gcube.accounting.datamodel.usagerecords.ServiceUsageRecord;
|
||||||
import org.gcube.accounting.datamodel.usagerecords.StorageUsageRecord;
|
import org.gcube.accounting.datamodel.usagerecords.StorageUsageRecord;
|
||||||
import org.gcube.accounting.datamodel.basetypes.StorageUsageRecord.DataType;
|
|
||||||
import org.gcube.accounting.datamodel.basetypes.StorageUsageRecord.OperationType;
|
|
||||||
import org.gcube.accounting.exception.InvalidValueException;
|
import org.gcube.accounting.exception.InvalidValueException;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
@ -101,8 +99,8 @@ public class TestUsageRecord {
|
||||||
usageRecord.setResourceURI(new URI(TEST_RESOURCE_URI));
|
usageRecord.setResourceURI(new URI(TEST_RESOURCE_URI));
|
||||||
usageRecord.setProviderURI(new URI(TEST_PROVIDER_URI));
|
usageRecord.setProviderURI(new URI(TEST_PROVIDER_URI));
|
||||||
|
|
||||||
usageRecord.setOperationType(OperationType.READ);
|
usageRecord.setOperationType(StorageUsageRecord.OperationType.READ);
|
||||||
usageRecord.setDataType(DataType.STORAGE);
|
usageRecord.setDataType(StorageUsageRecord.DataType.STORAGE);
|
||||||
|
|
||||||
usageRecord.setDataVolume(generateRandomLong(MIN_DATA_VOLUME, MAX_DATA_VOLUME));
|
usageRecord.setDataVolume(generateRandomLong(MIN_DATA_VOLUME, MAX_DATA_VOLUME));
|
||||||
|
|
|
@ -5,8 +5,8 @@ package org.gcube.accounting.aggregation;
|
||||||
|
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
|
import org.gcube.accounting.datamodel.basetypes.TestUsageRecord;
|
||||||
import org.gcube.accounting.exception.InvalidValueException;
|
import org.gcube.accounting.exception.InvalidValueException;
|
||||||
import org.gcube.accounting.testutility.TestUsageRecord;
|
|
||||||
import org.junit.Assert;
|
import org.junit.Assert;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
|
|
|
@ -5,11 +5,11 @@ package org.gcube.accounting.aggregation.scheduler;
|
||||||
|
|
||||||
import org.gcube.accounting.datamodel.SingleUsageRecord;
|
import org.gcube.accounting.datamodel.SingleUsageRecord;
|
||||||
import org.gcube.accounting.datamodel.UsageRecord;
|
import org.gcube.accounting.datamodel.UsageRecord;
|
||||||
|
import org.gcube.accounting.datamodel.basetypes.TestUsageRecord;
|
||||||
import org.gcube.accounting.datamodel.usagerecords.ServiceUsageRecord;
|
import org.gcube.accounting.datamodel.usagerecords.ServiceUsageRecord;
|
||||||
import org.gcube.accounting.persistence.PersistenceExecutor;
|
import org.gcube.accounting.persistence.PersistenceExecutor;
|
||||||
import org.gcube.accounting.testutility.StressTestUtility;
|
import org.gcube.accounting.testutility.StressTestUtility;
|
||||||
import org.gcube.accounting.testutility.TestOperation;
|
import org.gcube.accounting.testutility.TestOperation;
|
||||||
import org.gcube.accounting.testutility.TestUsageRecord;
|
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
|
@ -4,10 +4,10 @@
|
||||||
package org.gcube.accounting.aggregation.strategy;
|
package org.gcube.accounting.aggregation.strategy;
|
||||||
|
|
||||||
import org.gcube.accounting.aggregation.strategy.ServiceUsageRecordAggregationStrategy;
|
import org.gcube.accounting.aggregation.strategy.ServiceUsageRecordAggregationStrategy;
|
||||||
|
import org.gcube.accounting.datamodel.basetypes.TestUsageRecord;
|
||||||
import org.gcube.accounting.datamodel.usagerecords.ServiceUsageRecord;
|
import org.gcube.accounting.datamodel.usagerecords.ServiceUsageRecord;
|
||||||
import org.gcube.accounting.exception.InvalidValueException;
|
import org.gcube.accounting.exception.InvalidValueException;
|
||||||
import org.gcube.accounting.exception.NotAggregatableRecordsExceptions;
|
import org.gcube.accounting.exception.NotAggregatableRecordsExceptions;
|
||||||
import org.gcube.accounting.testutility.TestUsageRecord;
|
|
||||||
import org.junit.Assert;
|
import org.junit.Assert;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
|
|
|
@ -4,10 +4,10 @@
|
||||||
package org.gcube.accounting.aggregation.strategy;
|
package org.gcube.accounting.aggregation.strategy;
|
||||||
|
|
||||||
import org.gcube.accounting.aggregation.strategy.StorageUsageRecordAggregationStrategy;
|
import org.gcube.accounting.aggregation.strategy.StorageUsageRecordAggregationStrategy;
|
||||||
|
import org.gcube.accounting.datamodel.basetypes.TestUsageRecord;
|
||||||
import org.gcube.accounting.datamodel.usagerecords.StorageUsageRecord;
|
import org.gcube.accounting.datamodel.usagerecords.StorageUsageRecord;
|
||||||
import org.gcube.accounting.exception.InvalidValueException;
|
import org.gcube.accounting.exception.InvalidValueException;
|
||||||
import org.gcube.accounting.exception.NotAggregatableRecordsExceptions;
|
import org.gcube.accounting.exception.NotAggregatableRecordsExceptions;
|
||||||
import org.gcube.accounting.testutility.TestUsageRecord;
|
|
||||||
import org.junit.Assert;
|
import org.junit.Assert;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
|
|
|
@ -3,8 +3,8 @@
|
||||||
*/
|
*/
|
||||||
package org.gcube.accounting.datamodel;
|
package org.gcube.accounting.datamodel;
|
||||||
|
|
||||||
|
import org.gcube.accounting.datamodel.basetypes.TestUsageRecord;
|
||||||
import org.gcube.accounting.exception.InvalidValueException;
|
import org.gcube.accounting.exception.InvalidValueException;
|
||||||
import org.gcube.accounting.testutility.TestUsageRecord;
|
|
||||||
import org.junit.Assert;
|
import org.junit.Assert;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
|
|
||||||
|
|
|
@ -8,7 +8,7 @@ import java.util.Set;
|
||||||
|
|
||||||
import org.gcube.accounting.datamodel.BasicUsageRecord;
|
import org.gcube.accounting.datamodel.BasicUsageRecord;
|
||||||
import org.gcube.accounting.datamodel.BasicUsageRecordUtility;
|
import org.gcube.accounting.datamodel.BasicUsageRecordUtility;
|
||||||
import org.gcube.accounting.testutility.TestUsageRecord;
|
import org.gcube.accounting.datamodel.basetypes.TestUsageRecord;
|
||||||
import org.junit.Assert;
|
import org.junit.Assert;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
|
|
||||||
|
|
|
@ -4,9 +4,9 @@
|
||||||
package org.gcube.accounting.persistence;
|
package org.gcube.accounting.persistence;
|
||||||
|
|
||||||
import org.gcube.accounting.datamodel.SingleUsageRecord;
|
import org.gcube.accounting.datamodel.SingleUsageRecord;
|
||||||
|
import org.gcube.accounting.datamodel.basetypes.TestUsageRecord;
|
||||||
import org.gcube.accounting.testutility.StressTestUtility;
|
import org.gcube.accounting.testutility.StressTestUtility;
|
||||||
import org.gcube.accounting.testutility.TestOperation;
|
import org.gcube.accounting.testutility.TestOperation;
|
||||||
import org.gcube.accounting.testutility.TestUsageRecord;
|
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue