Change in ovirt-engine[master]: core: ImportVm test cleanup: Don't mock DAOs
amureini at redhat.com
amureini at redhat.com
Tue Dec 18 10:32:24 UTC 2012
Allon Mureinik has submitted this change and it was merged.
Change subject: core: ImportVm test cleanup: Don't mock DAOs
......................................................................
core: ImportVm test cleanup: Don't mock DAOs
Cleaned up the TestHelperImprotVmCommand to stop mocking DAOs and
instead override methods that represent a higher business logic, in
order to make the test more readable and understandable.
In order to achieve this refactoring, a few blocks of
ImportVmCommand.canDoAction() were extracted to methods, which could be
overridden.
Note that this is an interim patch, performed in order to make the real
goal, removing TestHelperImportVmCommand altogether.
Change-Id: I19d711cd8df8c0f8eccfe6b7838c16605829b2f6
Signed-off-by: Allon Mureinik <amureini at redhat.com>
---
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/ImportVmCommand.java
M backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/TestHelperImportVmCommand.java
2 files changed, 83 insertions(+), 136 deletions(-)
Approvals:
Tal Nisan: Looks good to me, approved
Allon Mureinik: Verified
--
To view, visit http://gerrit.ovirt.org/9626
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I19d711cd8df8c0f8eccfe6b7838c16605829b2f6
Gerrit-PatchSet: 16
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Allon Mureinik <amureini at redhat.com>
Gerrit-Reviewer: Alissa Bonas <abonas at redhat.com>
Gerrit-Reviewer: Allon Mureinik <amureini at redhat.com>
Gerrit-Reviewer: Daniel Erez <derez at redhat.com>
Gerrit-Reviewer: Liron Aravot <laravot at redhat.com>
Gerrit-Reviewer: Maor Lipchuk <mlipchuk at redhat.com>
Gerrit-Reviewer: Ravi Nori <rnori at redhat.com>
Gerrit-Reviewer: Sharad Mishra <snmishra at linux.vnet.ibm.com>
Gerrit-Reviewer: Tal Nisan <tnisan at redhat.com>
Gerrit-Reviewer: Vered Volansky <vvolansk at redhat.com>
More information about the Engine-commits
mailing list