Signed-off-by: Claudio Bley <cbley(a)av-test.de>
---
src/test/java/org/libvirt/TestJavaBindings.java | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/src/test/java/org/libvirt/TestJavaBindings.java
b/src/test/java/org/libvirt/TestJavaBindings.java
index a25c4f3..0123e6a 100644
--- a/src/test/java/org/libvirt/TestJavaBindings.java
+++ b/src/test/java/org/libvirt/TestJavaBindings.java
@@ -46,6 +46,20 @@ public final class TestJavaBindings extends TestCase {
assertTrue("conn.isSecure", conn.isSecure() == 1);
}
+ /*
+ * Excercise the listCapabilities method of the Device class.
+ */
+ public void testDeviceListCapabilities() throws Exception {
+ Device dev = this.conn.deviceLookupByName("computer");
+ String[] caps = dev.listCapabilities();
+
+ // check that all caps are non-empty strings
+ for (String c: caps) {
+ assertNotNull("capability is null", c);
+ assertFalse("capability is empty", c.isEmpty());
+ }
+ }
+
public void testNodeInfo() throws Exception {
NodeInfo nodeInfo = conn.nodeInfo();
assertEquals("nodeInfo.model", "i686", nodeInfo.model);
--
1.7.9.5