public void SerialConnection_OpenAndDoubleClose()
 {
     var connection = new SerialConnection();
     connection.Open();
     connection.Close();
     connection.Close();
 }
 public void SerialConnection_Constructor_WithParameters()
 {
     var connection = new SerialConnection("COM1", SerialBaudRate.Bps_115200);
     Assert.AreEqual(100, connection.ReadTimeout);
     Assert.AreEqual(100, connection.WriteTimeout);
     Assert.AreEqual(115200, connection.BaudRate);
 }
Example #3
0
 /// <inheritdoc cref="SerialConnection.FindSerialConnection(string, string)"/>
 public static ISerialConnection FindSerialConnection(string query, string expectedReply)
 {
     return(SerialConnection.FindSerialConnection(query, expectedReply));
 }
Example #4
0
 /// <inheritdoc cref="SerialConnection.FindSerialConnection()"/>
 public static ISerialConnection FindSerialConnection()
 {
     return(SerialConnection.FindSerialConnection());
 }