public void GivenDevice_WhenCreateDeviceWithUnknownPartialId_ThenDeviceIsNotEnabled() { using (var device = new Rs232Device("invalid")) { Assert.IsFalse(device.Enabled); } }
private static Rs232Device CreateDevice() { var device = new Rs232Device(_settings["Devices"]["SerialBlaster"][0]["portId"].ToString()); device.BaudRate = 115200; device.PreWrite = (x) => { return(x + "\r"); }; return(device); }
public void GivenNullPartialId_WhenNewDevice_ThenArgumentExceptionThrown() { using (var rs232Device = new Rs232Device(null)) { } }
public void GivenEmptyPartialId_WhenNewDevice_ThenArgumentExceptionThrown() { using (var rs232Device = new Rs232Device(string.Empty)) { } }