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 <amure...@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 <amure...@redhat.com>
Gerrit-Reviewer: Alissa Bonas <abo...@redhat.com>
Gerrit-Reviewer: Allon Mureinik <amure...@redhat.com>
Gerrit-Reviewer: Daniel Erez <de...@redhat.com>
Gerrit-Reviewer: Liron Aravot <lara...@redhat.com>
Gerrit-Reviewer: Maor Lipchuk <mlipc...@redhat.com>
Gerrit-Reviewer: Ravi Nori <rn...@redhat.com>
Gerrit-Reviewer: Sharad Mishra <snmis...@linux.vnet.ibm.com>
Gerrit-Reviewer: Tal Nisan <tni...@redhat.com>
Gerrit-Reviewer: Vered Volansky <vvola...@redhat.com>
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to