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

amureini at redhat.com amureini at redhat.com
Wed Oct 12 11:31:05 UTC 2016


Allon Mureinik has submitted this change and it was merged.

Change subject: core: AddClusterCommandTest @Spy
......................................................................


core: AddClusterCommandTest @Spy

Use the @Spy annotation to spy the command being tested in
order to allow injecting mocks.

This patch includes:

- Changing the command being tested to be initialized and
  annotated with @Spy and @InjectMocks.
- Now that the command has an @InjectMock annotation on it, the
  InjectorRule could be removed.
- Manual spying is replaced with just returning the injected mocks
  where possible.

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

Approvals:
  Allon Mureinik: Verified; Looks good to me, approved; Passed CI tests



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

Gerrit-MessageType: merged
Gerrit-Change-Id: I37d2f60838e47534b2abda9b459583a782729ab7
Gerrit-PatchSet: 10
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: Arik Hadas <ahadas at redhat.com>
Gerrit-Reviewer: Jakub Niedermertl <jniederm at redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Martin Betak <mbetak 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