use of org.opensmartgridplatform.adapter.protocol.dlms.domain.commands.utils.AmrProfileStatusCodeHelper in project open-smart-grid-platform by OSGP.
the class GetPeriodicMeterReadsCommandExecutorIntegrationTest method setUp.
@BeforeEach
public void setUp() {
final TimeZone defaultTimeZone = TimeZone.getDefault();
final DateTimeZone defaultDateTimeZone = DateTimeZone.getDefault();
// all time based tests must use UTC time.
TimeZone.setDefault(TimeZone.getTimeZone("UTC"));
DateTimeZone.setDefault(DateTimeZone.UTC);
this.initDates();
this.dlmsHelper = new DlmsHelper();
this.amrProfileStatusCodeHelper = new AmrProfileStatusCodeHelper();
final DlmsObjectConfigConfiguration dlmsObjectConfigConfiguration = new DlmsObjectConfigConfiguration();
this.dlmsObjectConfigService = new DlmsObjectConfigService(this.dlmsHelper, dlmsObjectConfigConfiguration.getDlmsObjectConfigs());
this.executor = new GetPeriodicMeterReadsCommandExecutor(this.dlmsHelper, this.amrProfileStatusCodeHelper, this.dlmsObjectConfigService);
this.connectionStub = new DlmsConnectionStub();
this.connectionManagerStub = new DlmsConnectionManagerStub(this.connectionStub);
this.connectionStub.setDefaultReturnValue(DataObject.newArrayData(Collections.emptyList()));
// reset to original TimeZone
TimeZone.setDefault(defaultTimeZone);
DateTimeZone.setDefault(defaultDateTimeZone);
}
use of org.opensmartgridplatform.adapter.protocol.dlms.domain.commands.utils.AmrProfileStatusCodeHelper in project open-smart-grid-platform by OSGP.
the class GetPeriodicMeterReadsGasCommandExecutorIntegrationTest method setUp.
@BeforeEach
public void setUp() {
final TimeZone defaultTimeZone = TimeZone.getDefault();
final DateTimeZone defaultDateTimeZone = DateTimeZone.getDefault();
// all time based tests must use UTC time.
TimeZone.setDefault(TimeZone.getTimeZone("UTC"));
DateTimeZone.setDefault(DateTimeZone.UTC);
this.initDates();
this.dlmsHelper = new DlmsHelper();
this.amrProfileStatusCodeHelper = new AmrProfileStatusCodeHelper();
final DlmsObjectConfigConfiguration dlmsObjectConfigConfiguration = new DlmsObjectConfigConfiguration();
this.dlmsObjectConfigService = new DlmsObjectConfigService(this.dlmsHelper, dlmsObjectConfigConfiguration.getDlmsObjectConfigs());
this.executor = new GetPeriodicMeterReadsGasCommandExecutor(this.dlmsHelper, this.amrProfileStatusCodeHelper, this.dlmsObjectConfigService);
this.connectionStub = new DlmsConnectionStub();
this.connectionManagerStub = new DlmsConnectionManagerStub(this.connectionStub);
this.connectionStub.setDefaultReturnValue(DataObject.newArrayData(Collections.emptyList()));
// reset to original TimeZone
TimeZone.setDefault(defaultTimeZone);
DateTimeZone.setDefault(defaultDateTimeZone);
}
Aggregations