public static void ReadDeviceFromNonExistingDevice() { Open(0x30); Assert.That(() => i2c.ReadDevice(10), Throws.Exception.TypeOf <CommandFailedException>().With.Property("Error").EqualTo(ErrorCode.PI_I2C_READ_FAILED)); Close(); }