Change in ovirt-engine[master]: core: EditAffinityGroupCommandTest @Spy annotation

tnisan at redhat.com tnisan at redhat.com
Thu Oct 20 12:37:59 UTC 2016


Tal Nisan has submitted this change and it was merged.

Change subject: core: EditAffinityGroupCommandTest @Spy annotation
......................................................................


core: EditAffinityGroupCommandTest @Spy annotation

Spy the command with the @Spy annotation instead of explicitly calling
Mockito.spy in order to use injected mocks instead of explicitly
spying their return.

Note that as the order of execution between @Mock and @Spy can't be
relied upon the parameters objects was converted from a mock to a real
instance. As this object is a simple data-POJO, there is no real reason
to mock it anyway, and doing so just adds complexity to the test.

Change-Id: Ia11e4739a6ca7277fa04b1a21c321d3629fd4cf6
Signed-off-by: Allon Mureinik <amureini at redhat.com>
---
M backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/scheduling/commands/EditAffinityGroupCommandTest.java
1 file changed, 7 insertions(+), 6 deletions(-)

Approvals:
  Tal Nisan: Looks good to me, approved
  Roman Mohr: Looks good to me, but someone else must approve
  Jenkins CI: Passed CI tests
  Allon Mureinik: Verified



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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ia11e4739a6ca7277fa04b1a21c321d3629fd4cf6
Gerrit-PatchSet: 17
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: Roman Mohr <rmohr 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