Change in ovirt-engine[master]: core: Unify RemoveStorageDomain[Command]Test
amureini at redhat.com
amureini at redhat.com
Wed Oct 30 16:32:17 UTC 2013
Allon Mureinik has submitted this change and it was merged.
Change subject: core: Unify RemoveStorageDomain[Command]Test
......................................................................
core: Unify RemoveStorageDomain[Command]Test
RemoveStorageDomainTest and RemoveStorageDomainCommandTest both test the
same command. Neither sets up any special environment, and in fact, they
have multiple duplications.
This patch streamlines the testing of RemoveStorageDomainCommand to a
single test case (RemoveStorageDomainCommandTest, as per JUnit
convention).
It includes:
1. Removing duplicate tests.
2. Bundling all the tests for executeAction() in a single method.
3. Cleaning up the mocking scheme (minor refactoring to the command
itself was required in order to achieve this).
Change-Id: Id85d95109b48f9191e972218f9a1a220db5aeeeb
Signed-off-by: Allon Mureinik <amureini at redhat.com>
---
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/RemoveStorageDomainCommand.java
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/StorageDomainCommandBase.java
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/StorageHandlingCommandBase.java
M backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/storage/RemoveStorageDomainCommandTest.java
D backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/storage/RemoveStorageDomainTest.java
5 files changed, 133 insertions(+), 316 deletions(-)
Approvals:
Allon Mureinik: Verified; Looks good to me, approved
--
To view, visit http://gerrit.ovirt.org/20684
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Id85d95109b48f9191e972218f9a1a220db5aeeeb
Gerrit-PatchSet: 4
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Allon Mureinik <amureini at redhat.com>
Gerrit-Reviewer: Alissa Bonas <abonas at redhat.com>
Gerrit-Reviewer: Allon Mureinik <amureini at redhat.com>
Gerrit-Reviewer: Daniel Erez <derez at redhat.com>
Gerrit-Reviewer: Tal Nisan <tnisan at redhat.com>
Gerrit-Reviewer: Vered Volansky <vvolansk at redhat.com>
Gerrit-Reviewer: oVirt Jenkins CI Server
More information about the Engine-commits
mailing list