Add unit tests for adapter classes
This commit is contained in:
parent
4d586e0cb8
commit
668d7cd6b1
@ -0,0 +1,37 @@
|
||||
/*
|
||||
* Copyright (C) 2013 Klaus Reimer <k@ailis.de>
|
||||
* See LICENSE.md for licensing information.
|
||||
*/
|
||||
package de.ailis.usb4java.adapter;
|
||||
|
||||
import javax.usb.event.UsbDeviceDataEvent;
|
||||
import javax.usb.event.UsbDeviceErrorEvent;
|
||||
import javax.usb.event.UsbDeviceEvent;
|
||||
import javax.usb.event.UsbDeviceListener;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
/**
|
||||
* Test the {@link UsbDeviceAdapter} class. There is not really anything to
|
||||
* test there. This class just ensures that the class exists and provides
|
||||
* the needed methods.
|
||||
*
|
||||
* @author Klaus Reimer (k@ailis.de)
|
||||
*/
|
||||
public class UsbDeviceAdapterTest
|
||||
{
|
||||
/**
|
||||
* Ensure the existence of the needed methods.
|
||||
*/
|
||||
@Test
|
||||
public void testAbstractMethods()
|
||||
{
|
||||
final UsbDeviceListener adapter = new UsbDeviceAdapter()
|
||||
{
|
||||
// Empty
|
||||
};
|
||||
adapter.usbDeviceDetached((UsbDeviceEvent) null);
|
||||
adapter.dataEventOccurred((UsbDeviceDataEvent) null);
|
||||
adapter.errorEventOccurred((UsbDeviceErrorEvent) null);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,35 @@
|
||||
/*
|
||||
* Copyright (C) 2013 Klaus Reimer <k@ailis.de>
|
||||
* See LICENSE.md for licensing information.
|
||||
*/
|
||||
package de.ailis.usb4java.adapter;
|
||||
|
||||
import javax.usb.event.UsbPipeDataEvent;
|
||||
import javax.usb.event.UsbPipeErrorEvent;
|
||||
import javax.usb.event.UsbPipeListener;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
/**
|
||||
* Test the {@link UsbPipeAdapter} class. There is not really anything to
|
||||
* test there. This class just ensures that the class exists and provides
|
||||
* the needed methods.
|
||||
*
|
||||
* @author Klaus Reimer (k@ailis.de)
|
||||
*/
|
||||
public class UsbPipeAdapterTest
|
||||
{
|
||||
/**
|
||||
* Ensure the existence of the needed methods.
|
||||
*/
|
||||
@Test
|
||||
public void testAbstractMethods()
|
||||
{
|
||||
final UsbPipeListener adapter = new UsbPipeAdapter()
|
||||
{
|
||||
// Empty
|
||||
};
|
||||
adapter.dataEventOccurred((UsbPipeDataEvent) null);
|
||||
adapter.errorEventOccurred((UsbPipeErrorEvent) null);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,34 @@
|
||||
/*
|
||||
* Copyright (C) 2013 Klaus Reimer <k@ailis.de>
|
||||
* See LICENSE.md for licensing information.
|
||||
*/
|
||||
package de.ailis.usb4java.adapter;
|
||||
|
||||
import javax.usb.event.UsbServicesEvent;
|
||||
import javax.usb.event.UsbServicesListener;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
/**
|
||||
* Test the {@link UsbServicesAdapter} class. There is not really anything to
|
||||
* test there. This class just ensures that the class exists and provides
|
||||
* the needed methods.
|
||||
*
|
||||
* @author Klaus Reimer (k@ailis.de)
|
||||
*/
|
||||
public class UsbServicesAdapterTest
|
||||
{
|
||||
/**
|
||||
* Ensure the existence of the needed methods.
|
||||
*/
|
||||
@Test
|
||||
public void testAbstractMethods()
|
||||
{
|
||||
final UsbServicesListener adapter = new UsbServicesAdapter()
|
||||
{
|
||||
// Empty
|
||||
};
|
||||
adapter.usbDeviceAttached((UsbServicesEvent) null);
|
||||
adapter.usbDeviceDetached((UsbServicesEvent) null);
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user