Package org.usb4java

Examples of org.usb4java.Device


     */
    @Test(expected = IllegalStateException.class)
    public void testGetPortNumbersWithUninitializedDevice()
    {
        assumeUsbTestsEnabled();
        LibUsb.getPortNumbers(new Device(), BufferUtils.allocateByteBuffer(16));
    }
View Full Code Here


        assumeNotNull(this.device);
        final DeviceList list = new DeviceList();
        LibUsb.getDeviceList(this.context, list);
        try
        {
            final Device parent = LibUsb.getParent(this.device);

            // We cannot test anything else here. Parent can be null if our
            // test device is a root device. We just make sure that it can't
            // be the device itself.
            assertNotEquals(parent, this.device);
View Full Code Here

    @Test
    public void testRefUnRefDevice()
    {
        assumeUsbTestsEnabled();
        assumeNotNull(this.device);
        final Device device = LibUsb.refDevice(this.device);
        try
        {
            assertEquals(this.device, device);
        }
        finally
View Full Code Here

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

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

     */
    @Test(expected = IllegalStateException.class)
    public void testGetConfigDescriptorWithUninitializedDevice()
    {
        assumeUsbTestsEnabled();
        LibUsb.getConfigDescriptor(new Device(), (byte) 0,
            new ConfigDescriptor());
    }
View Full Code Here

     */
    @Test(expected = IllegalStateException.class)
    public void testGetConfigDescriptorByValueWithUninitializedDevice()
    {
        assumeUsbTestsEnabled();
        LibUsb.getConfigDescriptorByValue(new Device(), (byte) 0,
            new ConfigDescriptor());
    }
View Full Code Here

TOP

Related Classes of org.usb4java.Device

Copyright © 2018 www.massapicom. 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.