Allon Mureinik has uploaded a new change for review. Change subject: core: ImportVm test cleanup: stop spying ......................................................................
core: ImportVm test cleanup: stop spying Removed useless calls to Mockito.spy(), which simply spied objects but did not add any defined behaviour. Change-Id: I3e895e90994e139c369b0b5f3c3218024b7bf103 Signed-off-by: Allon Mureinik <[email protected]> --- M backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/ImportVmCommandTest.java 1 file changed, 3 insertions(+), 6 deletions(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/18/9618/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 090aa57..3d2a858 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 @@ -5,7 +5,6 @@ import static org.junit.Assert.assertTrue; import static org.mockito.Matchers.anyString; import static org.mockito.Matchers.eq; -import static org.mockito.Mockito.spy; import java.util.Set; @@ -107,8 +106,7 @@ ImportVmParameters parameters = createParameters(); parameters.getVm().setvm_name(name); parameters.setImportAsNewEntity(isImportAsNewEntity); - ImportVmCommand command = - spy(new ImportVmCommand(parameters)); + ImportVmCommand command = new ImportVmCommand(parameters); Set<ConstraintViolation<ImportVmParameters>> validate = ValidationUtils.getValidator().validate(parameters, command.getValidationGroups().toArray(new Class<?>[0])); @@ -134,15 +132,14 @@ assertFalse(BusinessEntitiesDefinitions.GENERAL_MAX_SIZE > string5000.length()); parameters.getVm().setUserDefinedProperties(string5000); parameters.setImportAsNewEntity(true); - ImportVmCommand command = - spy(new ImportVmCommand(parameters)); + ImportVmCommand command = new ImportVmCommand(parameters); Set<ConstraintViolation<ImportVmParameters>> validate = ValidationUtils.getValidator().validate(parameters, command.getValidationGroups().toArray(new Class<?>[0])); assertTrue(validate.isEmpty()); parameters.getVm().setUserDefinedProperties(builder.toString()); parameters.setImportAsNewEntity(false); - command = spy(new ImportVmCommand(parameters)); + command = new ImportVmCommand(parameters); validate = ValidationUtils.getValidator().validate(parameters, command.getValidationGroups().toArray(new Class<?>[0])); -- To view, visit http://gerrit.ovirt.org/9618 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I3e895e90994e139c369b0b5f3c3218024b7bf103 Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Allon Mureinik <[email protected]> _______________________________________________ Engine-patches mailing list [email protected] http://lists.ovirt.org/mailman/listinfo/engine-patches
