int ACTIVE_HIGH = 1; public static final int ACTIVE_LOW = 0; public static final int DIRECTION_IN = 0; public static final int DIRECTION_OUT_INITIALLY_HIGH = 1; public static final int DIRECTION_OUT_INITIALLY_LOW = 2; public static final int EDGE_BOTH = 3; public static final int EDGE_FALLING = 2; public static final int EDGE_NONE = 0; public static final int EDGE_RISING = 1; public Gpio() { throw new RuntimeException("Stub!"); } public abstract void close() throws IOException; public abstract void setDirection(int var1) throws IOException; public abstract void setEdgeTriggerType(int var1) throws IOException; public abstract void setActiveType(int var1) throws IOException; public abstract void setValue(boolean var1) throws IOException; public abstract boolean getValue() throws IOException; public final void registerGpioCallback(GpioCallback callback) throws IOException { throw new RuntimeException("Stub!"); } public abstract void registerGpioCallback(GpioCallback var1, Handler var2) throws IOException; public abstract void unregisterGpioCallback(GpioCallback var1); }
fun setDirection(direction: Int) @Throws(IOException::class) fun setEdgeTriggerType(triggerType: Int) @Throws(IOException::class) fun setActiveType(activeType: Int) @Throws(IOException::class) fun setValue(value: Boolean) @Throws(IOException::class) fun getValue(): Boolean
lateinit var button: Sensor<@JvmSuppressWildcards Boolean> @Before fun setup() { val appContext = InstrumentationRegistry.getTargetContext().applicationContext val application = (appContext as TestApplication) val testingDriverComponent = application.driverComponent as TestingDriverComponent testingDriverComponent.inject(this) // Reset mocks reset(button) reset(led) }