use of org.opensmartgridplatform.adapter.protocol.dlms.domain.entities.DlmsDeviceBuilder in project open-smart-grid-platform by OSGP.
the class DlmsConnectionFactoryTest method createsConnectionManagerForLls1Device.
@Test
void createsConnectionManagerForLls1Device() throws Exception {
final DlmsDevice device = new DlmsDeviceBuilder().withLls1Active(true).build();
final DlmsMessageListener listener = new InvocationCountingDlmsMessageListener();
when(this.lls1Connector.connect(this.messageMetadata, device, listener)).thenReturn(this.connection);
final DlmsConnectionManager expected = this.newConnectionManager(device, listener, this.lls1Connector);
this.factory.createAndHandleConnection(this.messageMetadata, device, listener, this.task);
this.assertConnectionManagerForDevice(expected);
}
use of org.opensmartgridplatform.adapter.protocol.dlms.domain.entities.DlmsDeviceBuilder in project open-smart-grid-platform by OSGP.
the class BundleMessageProcessorTest method setUp.
@BeforeEach
void setUp() throws OsgpException, JMSException {
this.dlmsDevice = new DlmsDeviceBuilder().withHls5Active(true).build();
this.messageMetadata = MessageMetadata.fromMessage(this.message);
when(this.throttlingClientConfig.clientEnabled()).thenReturn(false);
}
use of org.opensmartgridplatform.adapter.protocol.dlms.domain.entities.DlmsDeviceBuilder in project open-smart-grid-platform by OSGP.
the class GetFirmwareFileResponseMessageProcessorTest method setUp.
@BeforeEach
void setUp() {
this.dlmsDevice = new DlmsDeviceBuilder().withHls5Active(true).build();
lenient().when(this.throttlingClientConfig.clientEnabled()).thenReturn(false);
}
Aggregations