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 <[email protected]>
---
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 <[email protected]>
Gerrit-Reviewer: Alissa Bonas <[email protected]>
Gerrit-Reviewer: Allon Mureinik <[email protected]>
Gerrit-Reviewer: Daniel Erez <[email protected]>
Gerrit-Reviewer: Liron Aravot <[email protected]>
Gerrit-Reviewer: Maor Lipchuk <[email protected]>
Gerrit-Reviewer: Ravi Nori <[email protected]>
Gerrit-Reviewer: Sharad Mishra <[email protected]>
Gerrit-Reviewer: Tal Nisan <[email protected]>
Gerrit-Reviewer: Vered Volansky <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to