Examples of DeviceHandle


Examples of org.usb4java.DeviceHandle

     */
    @Test(expected = IllegalArgumentException.class)
    public void testBulkTransferWithIndirectDataBuffer()
    {
        assumeUsbTestsEnabled();
        LibUsb.bulkTransfer(new DeviceHandle(), (byte) 0,
            ByteBuffer.allocate(0), BufferUtils.allocateIntBuffer(), 0);
    }
View Full Code Here

Examples of org.usb4java.DeviceHandle

     */
    @Test(expected = IllegalArgumentException.class)
    public void testBulkTransferWithoutTransferredBuffer()
    {
        assumeUsbTestsEnabled();
        LibUsb.bulkTransfer(new DeviceHandle(), (byte) 0,
            BufferUtils.allocateByteBuffer(0), null, 0);
    }
View Full Code Here

Examples of org.usb4java.DeviceHandle

     */
    @Test(expected = IllegalArgumentException.class)
    public void testInterruptTransferWithoutDataBuffer()
    {
        assumeUsbTestsEnabled();
        LibUsb.interruptTransfer(new DeviceHandle(), (byte) 0, null,
            BufferUtils.allocateIntBuffer(), 0);
    }
View Full Code Here

Examples of org.usb4java.DeviceHandle

     */
    @Test(expected = IllegalArgumentException.class)
    public void testInterruptTransferWithIndirectDataBuffer()
    {
        assumeUsbTestsEnabled();
        LibUsb.interruptTransfer(new DeviceHandle(), (byte) 0,
            ByteBuffer.allocate(0), BufferUtils.allocateIntBuffer(), 0);
    }
View Full Code Here

Examples of org.usb4java.DeviceHandle

     */
    @Test(expected = IllegalArgumentException.class)
    public void testInterruptTransferWithoutTransferredBuffer()
    {
        assumeUsbTestsEnabled();
        LibUsb.interruptTransfer(new DeviceHandle(), (byte) 0,
            BufferUtils.allocateByteBuffer(0), null, 0);
    }
View Full Code Here

Examples of org.usb4java.DeviceHandle

    @Test
    public void testDevHandle()
    {
        assumeUsbTestsEnabled();
        final Transfer transfer = LibUsb.allocTransfer(0);
        final DeviceHandle handle = new DeviceHandle();
        this.setPointer(handle, 1);
        final DeviceHandle handle2 = new DeviceHandle();
        this.setPointer(handle2, 2);
        assertNull(transfer.devHandle());
        transfer.setDevHandle(handle);
        assertNotNull(transfer.devHandle());
        assertNotSame(handle, transfer.devHandle());
View Full Code Here

Examples of org.usb4java.DeviceHandle

     */
    @Test(expected = IllegalStateException.class)
    public void testOpenWithUninitializedDevice()
    {
        assumeUsbTestsEnabled();
        LibUsb.open(new Device(), new DeviceHandle());
    }
View Full Code Here

Examples of org.usb4java.DeviceHandle

     */
    @Test(expected = IllegalStateException.class)
    public void testCloseWithUninitializedHandle()
    {
        assumeUsbTestsEnabled();
        LibUsb.close(new DeviceHandle());
    }
View Full Code Here

Examples of org.usb4java.DeviceHandle

     */
    @Test(expected = IllegalStateException.class)
    public void testGetDeviceWithUninitializedHandle()
    {
        assumeUsbTestsEnabled();
        LibUsb.getDevice(new DeviceHandle());
    }
View Full Code Here

Examples of org.usb4java.DeviceHandle

     */
    @Test(expected = IllegalStateException.class)
    public void testGetConfigurationWithUninitializedHandle()
    {
        assumeUsbTestsEnabled();
        LibUsb.getConfiguration(new DeviceHandle(),
            BufferUtils.allocateIntBuffer());
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.