Yevgeny Zaspitsky has uploaded a new change for review. Change subject: core: Add hamcrest-library as an explicit test dependency ......................................................................
core: Add hamcrest-library as an explicit test dependency The jar includes useful unit-test utilities (e.g. different Matcher implementations). Currently the dependency is obtained transitively through spring-boot-starter-test, which is going to be removed. That patch is the better implementation of https://gerrit.ovirt.org/40149. Change-Id: Idbec3ea20820972e1daf4981846290c40163b257 Signed-off-by: Yevgeny Zaspitsky <yzasp...@redhat.com> --- M backend/manager/modules/bll/pom.xml M backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/network/dc/GetManagementNetworkCandidatesQueryTest.java M pom.xml 3 files changed, 10 insertions(+), 2 deletions(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/62/40362/1 diff --git a/backend/manager/modules/bll/pom.xml b/backend/manager/modules/bll/pom.xml index a90f096..cce44d3 100644 --- a/backend/manager/modules/bll/pom.xml +++ b/backend/manager/modules/bll/pom.xml @@ -186,6 +186,12 @@ <artifactId>reflections</artifactId> <version>${reflections.version}</version> </dependency> + <dependency> + <groupId>org.hamcrest</groupId> + <artifactId>hamcrest-library</artifactId> + <version>${hamcrest.version}</version> + <scope>test</scope> + </dependency> </dependencies> <build> diff --git a/backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/network/dc/GetManagementNetworkCandidatesQueryTest.java b/backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/network/dc/GetManagementNetworkCandidatesQueryTest.java index a680d5c..b169706 100644 --- a/backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/network/dc/GetManagementNetworkCandidatesQueryTest.java +++ b/backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/network/dc/GetManagementNetworkCandidatesQueryTest.java @@ -1,7 +1,8 @@ package org.ovirt.engine.core.bll.network.dc; -import static org.junit.Assert.assertEquals; +import static org.hamcrest.Matchers.hasSize; import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.assertThat; import static org.junit.Assert.assertTrue; import static org.mockito.Mockito.when; @@ -63,7 +64,7 @@ final List<Network> actual = underTest.getQueryReturnValue().getReturnValue(); assertNotNull(actual); - assertEquals(1, actual.size()); + assertThat(actual, hasSize(1)); assertTrue(actual.contains(mockNonExternalNetwork)); } diff --git a/pom.xml b/pom.xml index b110e75..8ce9d18 100644 --- a/pom.xml +++ b/pom.xml @@ -116,6 +116,7 @@ <antlr.version>4.2.2</antlr.version> <deltaspike.version>1.1.0</deltaspike.version> <reflections.version>0.9.9-RC1</reflections.version> + <hamcrest.version>1.3</hamcrest.version> </properties> <dependencyManagement> <dependencies> -- To view, visit https://gerrit.ovirt.org/40362 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Idbec3ea20820972e1daf4981846290c40163b257 Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Yevgeny Zaspitsky <yzasp...@redhat.com> Gerrit-Reviewer: Martin Peřina <mper...@redhat.com> Gerrit-Reviewer: Moti Asayag <masa...@redhat.com> Gerrit-Reviewer: Yevgeny Zaspitsky <yzasp...@redhat.com> Gerrit-Reviewer: automat...@ovirt.org Gerrit-Reviewer: oVirt Jenkins CI Server _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches