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(a)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(a)redhat.com>
Gerrit-Reviewer: Alissa Bonas <abonas(a)redhat.com>
Gerrit-Reviewer: Allon Mureinik <amureini(a)redhat.com>
Gerrit-Reviewer: Daniel Erez <derez(a)redhat.com>
Gerrit-Reviewer: Liron Aravot <laravot(a)redhat.com>
Gerrit-Reviewer: Maor Lipchuk <mlipchuk(a)redhat.com>
Gerrit-Reviewer: Ravi Nori <rnori(a)redhat.com>
Gerrit-Reviewer: Sharad Mishra <snmishra(a)linux.vnet.ibm.com>
Gerrit-Reviewer: Tal Nisan <tnisan(a)redhat.com>
Gerrit-Reviewer: Vered Volansky <vvolansk(a)redhat.com>