Alona Kaplan has uploaded a new change for review.

Change subject: engine: use @Test(excepted=...) instead of try-catch
......................................................................

engine: use @Test(excepted=...) instead of try-catch

Change-Id: I0ff261bf0be53e51d7dbc5454ccb4896fd429ccd
Signed-off-by: Alona Kaplan <alkap...@redhat.com>
---
M 
backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/network/host/HostNicVfsConfigHelperImplTest.java
1 file changed, 2 insertions(+), 6 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/94/39694/1

diff --git 
a/backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/network/host/HostNicVfsConfigHelperImplTest.java
 
b/backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/network/host/HostNicVfsConfigHelperImplTest.java
index 1e98adc..6d69138 100644
--- 
a/backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/network/host/HostNicVfsConfigHelperImplTest.java
+++ 
b/backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/network/host/HostNicVfsConfigHelperImplTest.java
@@ -214,14 +214,10 @@
         when(hostDeviceDao.getAll()).thenReturn(devices);
     }
 
-    @Test
+    @Test(expected = UnsupportedOperationException.class)
     public void areAllVfsFreeNotSriovNic() {
         commonIsSriovDevice(false);
-        try {
-            hostNicVfsConfigHelper.areAllVfsFree(nic);
-        } catch (Exception exception) {
-            assertTrue(exception instanceof UnsupportedOperationException);
-        }
+        hostNicVfsConfigHelper.areAllVfsFree(nic);
     }
 
     @Test


-- 
To view, visit https://gerrit.ovirt.org/39694
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I0ff261bf0be53e51d7dbc5454ccb4896fd429ccd
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Alona Kaplan <alkap...@redhat.com>
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to