PortInUseException interface changed. Signed-off-by: Hilbrand Bouwkamp <hilbrand@h72.nl>
This commit is contained in:
parent
a693a4ed64
commit
0fc60d82c6
@ -132,9 +132,8 @@ public class DSMRSerialAutoDeviceTest {
|
||||
try (InputStream inputStream = new ByteArrayInputStream(new byte[] {})) {
|
||||
when(mockSerialPort.getInputStream()).thenReturn(inputStream);
|
||||
// Trigger device to go into error stage with port in use.
|
||||
doAnswer(a -> {
|
||||
throw new PortInUseException();
|
||||
}).when(mockIdentifier).open(eq(DSMRBindingConstants.DSMR_PORT_NAME), anyInt());
|
||||
doThrow(new PortInUseException(new Exception())).when(mockIdentifier)
|
||||
.open(eq(DSMRBindingConstants.DSMR_PORT_NAME), anyInt());
|
||||
DSMRSerialAutoDevice device = new DSMRSerialAutoDevice(serialPortManager, DUMMY_PORTNAME, listener,
|
||||
new DSMRTelegramListener(), scheduler, 1);
|
||||
device.start();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user