Roy Golan has submitted this change and it was merged.
Change subject: Domain Object builder for unit, DAO and integration tests
......................................................................
Domain Object builder for unit, DAO and integration tests
Add builders vor VMs, Hosts and clusters. These builders contain two
methods to actually create an entity:
* AbstractBuilder#persist() to persist the built object in a real
database. This is very useful when running DAO or integration tests
with an available database.
* AbstractBuilder#build() to just build the objects and return them.
This is very useful when writing unit tests. No database needs to be
present and no DAOs are involved.
Change-Id: Ia02585332f997e4eab151f62c5c2208e65b84346
Signed-off-by: Roman Mohr <rmohr(a)redhat.com>
---
A
backend/manager/modules/dal/src/test/java/org/ovirt/engine/core/builder/AbstractBuilder.java
A
backend/manager/modules/dal/src/test/java/org/ovirt/engine/core/builder/ClusterBuilder.java
A
backend/manager/modules/dal/src/test/java/org/ovirt/engine/core/builder/MacPoolBuilder.java
A backend/manager/modules/dal/src/test/java/org/ovirt/engine/core/builder/VdsBuilder.java
A backend/manager/modules/dal/src/test/java/org/ovirt/engine/core/builder/VmBuilder.java
M backend/manager/modules/dal/src/test/resources/test-beans.xml
6 files changed, 481 insertions(+), 0 deletions(-)
Approvals:
Martin Sivák: Looks good to me, but someone else must approve
Martin Peřina: Looks good to me, but someone else must approve
Roman Mohr: Verified
Jenkins CI: Passed CI tests
Roy Golan: Looks good to me, approved
--
To view, visit
https://gerrit.ovirt.org/47007
To unsubscribe, visit
https://gerrit.ovirt.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Ia02585332f997e4eab151f62c5c2208e65b84346
Gerrit-PatchSet: 17
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Roman Mohr <rmohr(a)redhat.com>
Gerrit-Reviewer: Allon Mureinik <amureini(a)redhat.com>
Gerrit-Reviewer: Andrej Krejcir <akrejcir(a)redhat.com>
Gerrit-Reviewer: Eli Mesika <emesika(a)redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Martin Peřina <mperina(a)redhat.com>
Gerrit-Reviewer: Martin Sivák <msivak(a)redhat.com>
Gerrit-Reviewer: Moti Asayag <masayag(a)redhat.com>
Gerrit-Reviewer: Roman Mohr <rmohr(a)redhat.com>
Gerrit-Reviewer: Roy Golan <rgolan(a)redhat.com>
Gerrit-Reviewer: gerrit-hooks <automation(a)ovirt.org>