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:
Luca Frosini 2015-07-02 10:01:59 +00:00
parent 5bfc630489
commit 7d69ed0851
8 changed files with 10 additions and 12 deletions

View File

@ -1,7 +1,7 @@
/**
*
*/
package org.gcube.accounting.testutility;
package org.gcube.accounting.datamodel.basetypes;
import java.net.URI;
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.ServiceUsageRecord;
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.slf4j.Logger;
import org.slf4j.LoggerFactory;
@ -101,8 +99,8 @@ public class TestUsageRecord {
usageRecord.setResourceURI(new URI(TEST_RESOURCE_URI));
usageRecord.setProviderURI(new URI(TEST_PROVIDER_URI));
usageRecord.setOperationType(OperationType.READ);
usageRecord.setDataType(DataType.STORAGE);
usageRecord.setOperationType(StorageUsageRecord.OperationType.READ);
usageRecord.setDataType(StorageUsageRecord.DataType.STORAGE);
usageRecord.setDataVolume(generateRandomLong(MIN_DATA_VOLUME, MAX_DATA_VOLUME));

View File

@ -5,8 +5,8 @@ package org.gcube.accounting.aggregation;
import java.util.Set;
import org.gcube.accounting.datamodel.basetypes.TestUsageRecord;
import org.gcube.accounting.exception.InvalidValueException;
import org.gcube.accounting.testutility.TestUsageRecord;
import org.junit.Assert;
import org.junit.Test;
import org.slf4j.Logger;

View File

@ -5,11 +5,11 @@ package org.gcube.accounting.aggregation.scheduler;
import org.gcube.accounting.datamodel.SingleUsageRecord;
import org.gcube.accounting.datamodel.UsageRecord;
import org.gcube.accounting.datamodel.basetypes.TestUsageRecord;
import org.gcube.accounting.datamodel.usagerecords.ServiceUsageRecord;
import org.gcube.accounting.persistence.PersistenceExecutor;
import org.gcube.accounting.testutility.StressTestUtility;
import org.gcube.accounting.testutility.TestOperation;
import org.gcube.accounting.testutility.TestUsageRecord;
import org.junit.Test;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

View File

@ -4,10 +4,10 @@
package org.gcube.accounting.aggregation.strategy;
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.exception.InvalidValueException;
import org.gcube.accounting.exception.NotAggregatableRecordsExceptions;
import org.gcube.accounting.testutility.TestUsageRecord;
import org.junit.Assert;
import org.junit.Test;
import org.slf4j.Logger;

View File

@ -4,10 +4,10 @@
package org.gcube.accounting.aggregation.strategy;
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.exception.InvalidValueException;
import org.gcube.accounting.exception.NotAggregatableRecordsExceptions;
import org.gcube.accounting.testutility.TestUsageRecord;
import org.junit.Assert;
import org.junit.Test;
import org.slf4j.Logger;

View File

@ -3,8 +3,8 @@
*/
package org.gcube.accounting.datamodel;
import org.gcube.accounting.datamodel.basetypes.TestUsageRecord;
import org.gcube.accounting.exception.InvalidValueException;
import org.gcube.accounting.testutility.TestUsageRecord;
import org.junit.Assert;
import org.junit.Test;

View File

@ -8,7 +8,7 @@ import java.util.Set;
import org.gcube.accounting.datamodel.BasicUsageRecord;
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.Test;

View File

@ -4,9 +4,9 @@
package org.gcube.accounting.persistence;
import org.gcube.accounting.datamodel.SingleUsageRecord;
import org.gcube.accounting.datamodel.basetypes.TestUsageRecord;
import org.gcube.accounting.testutility.StressTestUtility;
import org.gcube.accounting.testutility.TestOperation;
import org.gcube.accounting.testutility.TestUsageRecord;
import org.junit.Test;
/**