[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[libvirt] [libvirt-java] [PATCH 05/65] test: ensure that exceptions are thrown when expected



Signed-off-by: Claudio Bley <cbley av-test de>
---
 src/test/java/org/libvirt/TestJavaBindings.java |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/test/java/org/libvirt/TestJavaBindings.java b/src/test/java/org/libvirt/TestJavaBindings.java
index 9e7fa82..a25c4f3 100644
--- a/src/test/java/org/libvirt/TestJavaBindings.java
+++ b/src/test/java/org/libvirt/TestJavaBindings.java
@@ -27,6 +27,7 @@ public final class TestJavaBindings extends TestCase {
 
         try {
             conn.domainDefineXML("fail, miserably");
+            fail("LibvirtException expected");
         } catch (LibvirtException e) {} // ignore
 
         assertTrue("Error callback was not called", cb.error);
@@ -87,6 +88,7 @@ public final class TestJavaBindings extends TestCase {
         // this should throw an exception
         try {
             network1.create();
+            fail("LibvirtException expected");
         } catch (LibvirtException e) {
             // eat it
         }
-- 
1.7.9.5


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]