public void ReadDiscretesResponseDisposesSuccessfullyWhenUninitialized()
        {
            // Arrange
            ReadCoilsResponse response = new ReadCoilsResponse();

            // Act/Assert
            response.Dispose();
        }
Exemple #2
0
        public void ReadCoilsResponseToString()
        {
            // Arrange
            var response = new ReadCoilsResponse();

            response.Initialize(new byte[] { 5, ModbusFunctionCodes.ReadCoils, 2, 1, 1 });

            // Act/Assert
            Assert.Equal($"Read 16 coils from slave 5", response.ToString());
            response.Dispose();
        }