Change in ovirt-engine[master]: core: RemoveVdsCommandTest @Spy
amureini at redhat.com
amureini at redhat.com
Sat Oct 1 18:52:58 UTC 2016
Allon Mureinik has submitted this change and it was merged.
Change subject: core: RemoveVdsCommandTest @Spy
......................................................................
core: RemoveVdsCommandTest @Spy
Use the @Spy annotation to spy the command being tested in
order to allow injecting mocks in subsequent patches.
This patch includes:
- Changing the command being tested to be initialized once and
annotated with @Spy and @InjectMocks.
- Thus, there is only only command object per test, so all the
methods receiving commands as parameters were redone to use the
member.
- Removed redundant mocking.
- Wherever possible, these now argument-less methods were annotated
with @Before to avoid having to call them explicitly in each test.
- Setters were added to the parameter class to allow changing its
properties after the command has been created.
Change-Id: If956ce1c275bb2daa83e49aba7a347d83f52f81f
Signed-off-by: Allon Mureinik <amureini at redhat.com>
---
M backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/RemoveVdsCommandTest.java
M backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/action/RemoveVdsParameters.java
2 files changed, 12 insertions(+), 27 deletions(-)
Approvals:
Tal Nisan: Looks good to me, approved
Allon Mureinik: Verified; Passed CI tests
--
To view, visit https://gerrit.ovirt.org/64625
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: If956ce1c275bb2daa83e49aba7a347d83f52f81f
Gerrit-PatchSet: 6
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: Jenkins CI
Gerrit-Reviewer: Martin Peřina <mperina at redhat.com>
Gerrit-Reviewer: Tal Nisan <tnisan at redhat.com>
Gerrit-Reviewer: Yevgeny Zaspitsky <yzaspits at redhat.com>
Gerrit-Reviewer: gerrit-hooks <automation at ovirt.org>
More information about the Engine-commits
mailing list