public void CreateDataStoreEventArgs()
        {
            var eventArgs = DataStoreEventArgs.CreateDataStoreEventArgs(5, ModbusDataType.HoldingRegister, new ushort[] { 1, 2, 3 });

            Assert.AreEqual(ModbusDataType.HoldingRegister, eventArgs.ModbusDataType);
            Assert.AreEqual(5, eventArgs.StartAddress);
            Assert.AreEqual(new ushort[] { 1, 2, 3 }, eventArgs.Data.B.ToArray());
        }
 public void CreateDataStoreEventArgs_DataNull() =>
 Assert.Throws <ArgumentNullException>(() =>
                                       DataStoreEventArgs.CreateDataStoreEventArgs(5, ModbusDataType.HoldingRegister, default(ushort[])));
 public void CreateDataStoreEventArgs_InvalidType() =>
 Assert.Throws <ArgumentException>(() => DataStoreEventArgs.CreateDataStoreEventArgs(5, ModbusDataType.HoldingRegister,
                                                                                     new int[] { 1, 2, 3 }));
 public void CreateDataStoreEventArgs_DataNull()
 {
     var eventArgs = DataStoreEventArgs.CreateDataStoreEventArgs(5, ModbusDataType.HoldingRegister, default(ushort[]));
 }
 public void CreateDataStoreEventArgs_InvalidType()
 {
     var eventArgs = DataStoreEventArgs.CreateDataStoreEventArgs(5, ModbusDataType.HoldingRegister, new int[] { 1, 2, 3 });
 }