Allon Mureinik has uploaded a new change for review.

Change subject: core: ImportVm test cleanup: remove spring
......................................................................

core: ImportVm test cleanup: remove spring

Remove wrongfully used spring validation assertions and replaced with
standard JUnit 4 calls.

Change-Id: I67e7593ea28751cd6c4c50a54ec0bdf46174107f
Signed-off-by: Allon Mureinik <amure...@redhat.com>
---
M 
backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/ImportVmCommandTest.java
1 file changed, 4 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/17/9617/1

diff --git 
a/backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/ImportVmCommandTest.java
 
b/backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/ImportVmCommandTest.java
index a47f493..090aa57 100644
--- 
a/backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/ImportVmCommandTest.java
+++ 
b/backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/ImportVmCommandTest.java
@@ -1,5 +1,6 @@
 package org.ovirt.engine.core.bll;
 
+import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertTrue;
 import static org.mockito.Matchers.anyString;
@@ -21,7 +22,6 @@
 import org.ovirt.engine.core.compat.Guid;
 import org.ovirt.engine.core.dal.VdcBllMessages;
 import org.ovirt.engine.core.utils.MockConfigRule;
-import org.springframework.util.Assert;
 
 public class ImportVmCommandTest {
 
@@ -112,7 +112,7 @@
         Set<ConstraintViolation<ImportVmParameters>> validate =
                 ValidationUtils.getValidator().validate(parameters,
                         command.getValidationGroups().toArray(new 
Class<?>[0]));
-        Assert.isTrue(validate.isEmpty() == !isImportAsNewEntity);
+        assertEquals(validate.isEmpty(), !isImportAsNewEntity);
     }
 
     /**
@@ -139,14 +139,14 @@
         Set<ConstraintViolation<ImportVmParameters>> validate =
                 ValidationUtils.getValidator().validate(parameters,
                         command.getValidationGroups().toArray(new 
Class<?>[0]));
-        Assert.isTrue(validate.isEmpty());
+        assertTrue(validate.isEmpty());
         parameters.getVm().setUserDefinedProperties(builder.toString());
         parameters.setImportAsNewEntity(false);
         command = spy(new ImportVmCommand(parameters));
         validate =
                 ValidationUtils.getValidator().validate(parameters,
                         command.getValidationGroups().toArray(new 
Class<?>[0]));
-        Assert.isTrue(validate.isEmpty());
+        assertTrue(validate.isEmpty());
     }
 
 }


--
To view, visit http://gerrit.ovirt.org/9617
To unsubscribe, visit http://gerrit.ovirt.org/settings

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

Reply via email to