@Test public void testCloseClosesDevice() throws IOException { pcf8574.close(); Mockito.verify(device).close(); }
@Override public void close() { if (device != null) { try { device.close(); } catch (IOException ignore) { } } }
Pcf8574 implements AutoCloseable { @Override public void close() { if (device != null) { try { device.close(); } catch (IOException ignore) { } } } }
Pcf8574 implements AutoCloseable { @Override public void close() { if (device != null) { try { device.close(); } catch (IOException ignore) { } } } @VisibleForTesting  Pcf8574(I2cDevice device); }
Pcf8574 implements AutoCloseable { @Override public void close() { if (device != null) { try { device.close(); } catch (IOException ignore) { } } } @VisibleForTesting  Pcf8574(I2cDevice device); static Pcf8574 create(int address, boolean isPcf8574); static Pcf8574 create(int address, String bus, boolean isPcf8574); static int BV(int pin); @Override void close(); boolean writeByte(int mask, int data); int readValue(); void setPin(int pin, boolean state); boolean getPin(int pin); int readByte(); }
Pcf8574 implements AutoCloseable { @Override public void close() { if (device != null) { try { device.close(); } catch (IOException ignore) { } } } @VisibleForTesting  Pcf8574(I2cDevice device); static Pcf8574 create(int address, boolean isPcf8574); static Pcf8574 create(int address, String bus, boolean isPcf8574); static int BV(int pin); @Override void close(); boolean writeByte(int mask, int data); int readValue(); void setPin(int pin, boolean state); boolean getPin(int pin); int readByte();  }