Fixed Tests
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/accounting/accounting-lib@124114 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
9a3f477262
commit
70e0570c82
|
@ -3,7 +3,7 @@
|
|||
*/
|
||||
package org.gcube.accounting.datamodel;
|
||||
|
||||
import org.gcube.accounting.datamodel.basetypes.TestUsageRecord;
|
||||
import org.gcube.accounting.testutility.TestUsageRecord;
|
||||
import org.gcube.documentstore.exception.InvalidValueException;
|
||||
import org.gcube.documentstore.records.RecordUtility;
|
||||
import org.junit.Assert;
|
||||
|
|
|
@ -5,9 +5,9 @@ package org.gcube.accounting.datamodel.aggregation;
|
|||
|
||||
import java.util.Set;
|
||||
|
||||
import org.gcube.accounting.datamodel.basetypes.TestUsageRecord;
|
||||
import org.gcube.accounting.datamodel.usagerecords.ServiceUsageRecord;
|
||||
import org.gcube.accounting.datamodel.usagerecords.ServiceUsageRecordTest;
|
||||
import org.gcube.accounting.testutility.TestUsageRecord;
|
||||
import org.gcube.common.authorization.library.provider.SecurityTokenProvider;
|
||||
import org.gcube.documentstore.exception.InvalidValueException;
|
||||
import org.gcube.documentstore.exception.NotAggregatableRecordsExceptions;
|
||||
|
@ -163,6 +163,7 @@ public class AggregatedServiceUsageRecordTest {
|
|||
for(int i=2; i<1002; i++){
|
||||
|
||||
ServiceUsageRecord sur = TestUsageRecord.createTestServiceUsageRecord();
|
||||
sur.setScope(TestUsageRecord.TEST_SCOPE);
|
||||
sur.setResourceProperty(TestUsageRecord.TEST_PROPERTY_NAME, TestUsageRecord.TEST_PROPERTY_VALUE);
|
||||
sur.validate();
|
||||
logger.debug("Cycle ServiceUsageRecord {}: {}", i, sur);
|
||||
|
|
|
@ -3,8 +3,8 @@
|
|||
*/
|
||||
package org.gcube.accounting.datamodel.aggregation;
|
||||
|
||||
import org.gcube.accounting.datamodel.basetypes.TestUsageRecord;
|
||||
import org.gcube.accounting.datamodel.usagerecords.StorageUsageRecord;
|
||||
import org.gcube.accounting.testutility.TestUsageRecord;
|
||||
import org.gcube.common.authorization.library.provider.SecurityTokenProvider;
|
||||
import org.gcube.documentstore.exception.InvalidValueException;
|
||||
import org.gcube.documentstore.exception.NotAggregatableRecordsExceptions;
|
||||
|
@ -42,6 +42,7 @@ public class AggregatedStorageUsageRecordTest {
|
|||
aggregated.validate();
|
||||
|
||||
StorageUsageRecord storageUsageRecord2 = TestUsageRecord.createTestStorageUsageRecord();
|
||||
storageUsageRecord2.setScope(TestUsageRecord.TEST_SCOPE);
|
||||
storageUsageRecord2.validate();
|
||||
logger.debug("StorageUsageRecord 2 : {}", storageUsageRecord2);
|
||||
|
||||
|
@ -108,6 +109,7 @@ public class AggregatedStorageUsageRecordTest {
|
|||
for(int i=2; i<1002; i++){
|
||||
|
||||
StorageUsageRecord sur = TestUsageRecord.createTestStorageUsageRecord();
|
||||
sur.setScope(TestUsageRecord.TEST_SCOPE);
|
||||
sur.setResourceProperty(TestUsageRecord.TEST_PROPERTY_NAME, TestUsageRecord.TEST_PROPERTY_VALUE);
|
||||
sur.validate();
|
||||
logger.debug("Cycle StorageUsageRecord {}: {}", i, sur);
|
||||
|
|
|
@ -8,7 +8,7 @@ import java.util.Set;
|
|||
|
||||
import org.gcube.accounting.datamodel.UsageRecord;
|
||||
import org.gcube.accounting.datamodel.basetypes.AbstractJobUsageRecord;
|
||||
import org.gcube.accounting.datamodel.basetypes.TestUsageRecord;
|
||||
import org.gcube.accounting.testutility.TestUsageRecord;
|
||||
import org.gcube.common.authorization.library.provider.SecurityTokenProvider;
|
||||
import org.gcube.documentstore.exception.InvalidValueException;
|
||||
import org.gcube.documentstore.records.Record;
|
||||
|
|
|
@ -8,7 +8,7 @@ import java.util.Set;
|
|||
|
||||
import org.gcube.accounting.datamodel.UsageRecord;
|
||||
import org.gcube.accounting.datamodel.basetypes.AbstractServiceUsageRecord;
|
||||
import org.gcube.accounting.datamodel.basetypes.TestUsageRecord;
|
||||
import org.gcube.accounting.testutility.TestUsageRecord;
|
||||
import org.gcube.common.authorization.library.provider.SecurityTokenProvider;
|
||||
import org.gcube.documentstore.exception.InvalidValueException;
|
||||
import org.gcube.documentstore.records.Record;
|
||||
|
|
|
@ -8,7 +8,7 @@ import java.util.Set;
|
|||
|
||||
import org.gcube.accounting.datamodel.UsageRecord;
|
||||
import org.gcube.accounting.datamodel.basetypes.AbstractStorageUsageRecord;
|
||||
import org.gcube.accounting.datamodel.basetypes.TestUsageRecord;
|
||||
import org.gcube.accounting.testutility.TestUsageRecord;
|
||||
import org.gcube.common.authorization.library.provider.SecurityTokenProvider;
|
||||
import org.gcube.documentstore.exception.InvalidValueException;
|
||||
import org.gcube.documentstore.records.Record;
|
||||
|
|
|
@ -8,7 +8,7 @@ import java.util.Set;
|
|||
|
||||
import org.gcube.accounting.datamodel.UsageRecord;
|
||||
import org.gcube.accounting.datamodel.basetypes.AbstractTaskUsageRecord;
|
||||
import org.gcube.accounting.datamodel.basetypes.TestUsageRecord;
|
||||
import org.gcube.accounting.testutility.TestUsageRecord;
|
||||
import org.gcube.common.authorization.library.provider.SecurityTokenProvider;
|
||||
import org.gcube.documentstore.exception.InvalidValueException;
|
||||
import org.gcube.documentstore.records.Record;
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/**
|
||||
*
|
||||
*/
|
||||
package org.gcube.accounting.datamodel.basetypes;
|
||||
package org.gcube.accounting.testutility;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.net.URI;
|
||||
|
@ -11,6 +11,7 @@ import java.util.HashMap;
|
|||
import java.util.UUID;
|
||||
|
||||
import org.gcube.accounting.datamodel.UsageRecord.OperationResult;
|
||||
import org.gcube.accounting.datamodel.basetypes.AbstractStorageUsageRecord;
|
||||
import org.gcube.accounting.datamodel.usagerecords.JobUsageRecord;
|
||||
import org.gcube.accounting.datamodel.usagerecords.ServiceUsageRecord;
|
||||
import org.gcube.accounting.datamodel.usagerecords.StorageUsageRecord;
|
Loading…
Reference in New Issue