Ejemplo n.º 1
0
        protected override void Validate(IModbusRequest request, IModbusResponse response)
        {
            request.Validate(response);

            if (request.TransactionId != response.TransactionId)
            {
                throw new IOException($"Received unexpected transaction Id. Expected: {request.TransactionId}. Received: {response.TransactionId}.");
            }
        }
Ejemplo n.º 2
0
 protected override void Validate(IModbusRequest request, IModbusResponse response)
 {
     request.Validate(response);
 }
Ejemplo n.º 3
0
 public void ValidatesResponse(IModbusRequest request, IModbusResponse response)
 {
     // Arrange/Act/Assert
     Assert.Throws <IOException>(() => request.Validate(response));
 }