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

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

 



On Thu, Feb 13, 2014 at 04:22:13PM +0100, Claudio Bley wrote:
> 
> Signed-off-by: Claudio Bley <cbley@xxxxxxxxxx>
> ---
>  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
>          }

ACK (from a non Java expert).
 -- Guido

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]