Change in ovirt-engine[master]: core: AddCpuProfileCommandTest @InjectMocks

Code Review gerrit at ovirt.org
Mon Feb 13 10:52:20 UTC 2017


>From Allon Mureinik <amureini at redhat.com>:

Allon Mureinik has submitted this change and it was merged.

Change subject: core: AddCpuProfileCommandTest @InjectMocks
......................................................................


core: AddCpuProfileCommandTest @InjectMocks

Use @InjectMocks to inject the tests dependencies instead of the
convoluted boilerplate practice of using doReturn.

Note that the mocked DAO was changed from ProfilesDao<CpuProfile> to
CpuProfileDao so that the injection mechanism would pick up on it.

Change-Id: I16a0a261df0ddfed0debd3edaf2711c17e02b0af
Signed-off-by: Allon Mureinik <amureini at redhat.com>
---
M backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/profiles/AddCpuProfileCommandTest.java
1 file changed, 13 insertions(+), 47 deletions(-)

Approvals:
  Tal Nisan: Looks good to me, approved
  Jenkins CI: Passed CI tests
  Allon Mureinik: Verified



-- 
To view, visit https://gerrit.ovirt.org/72122
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I16a0a261df0ddfed0debd3edaf2711c17e02b0af
Gerrit-PatchSet: 2
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Allon Mureinik <amureini at redhat.com>
Gerrit-Reviewer: Allon Mureinik <amureini at redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Martin Sivák <msivak at redhat.com>
Gerrit-Reviewer: Roy Golan <rgolan at redhat.com>
Gerrit-Reviewer: Tal Nisan <tnisan at redhat.com>
Gerrit-Reviewer: gerrit-hooks <automation at ovirt.org>


More information about the Engine-commits mailing list