From b2163044824fa1b240458582bb8deaee3db94813 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20M=C3=BCller?= Date: Thu, 7 Aug 2025 16:42:54 +0200 Subject: [PATCH] Added missing snapshot tests --- .../AMWD.Protocols.Modbus.Tests.csproj | 2 ++ .../ShouldReadDeviceIdentification.snap.bin | 9 +++++++++ .../ShouldPrintCleanString.snap.bin | 8 ++++++++ .../ModbusTcpClientTest/ShouldPrintCleanString.snap.bin | 2 ++ .../ShouldReadDeviceIdentification.snap.bin | 9 +++++++++ 5 files changed, 30 insertions(+) create mode 100644 test/AMWD.Protocols.Modbus.Tests/Serial/Snapshots/ModbusRtuProxyTest/ShouldReadDeviceIdentification.snap.bin create mode 100644 test/AMWD.Protocols.Modbus.Tests/Serial/Snapshots/ModbusSerialClientTest/ShouldPrintCleanString.snap.bin create mode 100644 test/AMWD.Protocols.Modbus.Tests/Tcp/Snapshots/ModbusTcpClientTest/ShouldPrintCleanString.snap.bin create mode 100644 test/AMWD.Protocols.Modbus.Tests/Tcp/Snapshots/ModbusTcpProxyTest/ShouldReadDeviceIdentification.snap.bin diff --git a/test/AMWD.Protocols.Modbus.Tests/AMWD.Protocols.Modbus.Tests.csproj b/test/AMWD.Protocols.Modbus.Tests/AMWD.Protocols.Modbus.Tests.csproj index 90de841..d55192a 100644 --- a/test/AMWD.Protocols.Modbus.Tests/AMWD.Protocols.Modbus.Tests.csproj +++ b/test/AMWD.Protocols.Modbus.Tests/AMWD.Protocols.Modbus.Tests.csproj @@ -1,5 +1,7 @@  + + diff --git a/test/AMWD.Protocols.Modbus.Tests/Serial/Snapshots/ModbusRtuProxyTest/ShouldReadDeviceIdentification.snap.bin b/test/AMWD.Protocols.Modbus.Tests/Serial/Snapshots/ModbusRtuProxyTest/ShouldReadDeviceIdentification.snap.bin new file mode 100644 index 0000000..76fddc0 --- /dev/null +++ b/test/AMWD.Protocols.Modbus.Tests/Serial/Snapshots/ModbusRtuProxyTest/ShouldReadDeviceIdentification.snap.bin @@ -0,0 +1,9 @@ +DeviceIdentification + VendorName: VendorName + ProductCode: ProductCode + MajorMinorRevision: MajorMinorRevision + VendorUrl: + ProductName: + ModelName: + UserApplicationName: + IsIndividualAccessAllowed: False diff --git a/test/AMWD.Protocols.Modbus.Tests/Serial/Snapshots/ModbusSerialClientTest/ShouldPrintCleanString.snap.bin b/test/AMWD.Protocols.Modbus.Tests/Serial/Snapshots/ModbusSerialClientTest/ShouldPrintCleanString.snap.bin new file mode 100644 index 0000000..f1bbcab --- /dev/null +++ b/test/AMWD.Protocols.Modbus.Tests/Serial/Snapshots/ModbusSerialClientTest/ShouldPrintCleanString.snap.bin @@ -0,0 +1,8 @@ +Serial Client COM-42 + BaudRate: 2400 + DataBits: 7 + StopBits: 1.5 + Parity: space + Handshake: xonxoff + RtsEnable: true + DriverEnabledRS485: true diff --git a/test/AMWD.Protocols.Modbus.Tests/Tcp/Snapshots/ModbusTcpClientTest/ShouldPrintCleanString.snap.bin b/test/AMWD.Protocols.Modbus.Tests/Tcp/Snapshots/ModbusTcpClientTest/ShouldPrintCleanString.snap.bin new file mode 100644 index 0000000..85ab124 --- /dev/null +++ b/test/AMWD.Protocols.Modbus.Tests/Tcp/Snapshots/ModbusTcpClientTest/ShouldPrintCleanString.snap.bin @@ -0,0 +1,2 @@ +TCP Client 127.0.0.1 + Port: 502 diff --git a/test/AMWD.Protocols.Modbus.Tests/Tcp/Snapshots/ModbusTcpProxyTest/ShouldReadDeviceIdentification.snap.bin b/test/AMWD.Protocols.Modbus.Tests/Tcp/Snapshots/ModbusTcpProxyTest/ShouldReadDeviceIdentification.snap.bin new file mode 100644 index 0000000..76fddc0 --- /dev/null +++ b/test/AMWD.Protocols.Modbus.Tests/Tcp/Snapshots/ModbusTcpProxyTest/ShouldReadDeviceIdentification.snap.bin @@ -0,0 +1,9 @@ +DeviceIdentification + VendorName: VendorName + ProductCode: ProductCode + MajorMinorRevision: MajorMinorRevision + VendorUrl: + ProductName: + ModelName: + UserApplicationName: + IsIndividualAccessAllowed: False