From: Olivier Lamy Date: Sat, 2 Jun 2012 21:41:16 +0000 (+0000) Subject: fix junit X-Git-Tag: archiva-1.4-M3~645 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=0c42d87da1c4a5ec94c9949634fdede91c65697c;p=archiva.git fix junit git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1345591 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/test/java/org/apache/archiva/rest/services/SearchServiceTest.java b/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/test/java/org/apache/archiva/rest/services/SearchServiceTest.java index cb75bce99..81183f432 100644 --- a/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/test/java/org/apache/archiva/rest/services/SearchServiceTest.java +++ b/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/test/java/org/apache/archiva/rest/services/SearchServiceTest.java @@ -22,6 +22,7 @@ import org.apache.archiva.admin.model.beans.UiConfiguration; import org.apache.archiva.rest.api.model.Artifact; import org.apache.archiva.rest.api.model.SearchRequest; import org.apache.archiva.rest.api.services.SearchService; +import org.fest.assertions.Assertions; import org.junit.Test; import java.util.Arrays; @@ -68,6 +69,7 @@ public class SearchServiceTest /** * same search but with Guest user + * * @throws Exception */ @Test @@ -225,10 +227,7 @@ public class SearchServiceTest List artifacts = searchService.searchArtifacts( searchRequest ); - assertNotNull( artifacts ); - assertTrue( - " not 2 results for Bundle Symbolic Name org.apache.karaf.features.core but " + artifacts.size() + ":" - + artifacts, artifacts.size() == 2 ); + Assertions.assertThat( artifacts ).isNotNull().hasSize( 2 ); for ( Artifact artifact : artifacts ) { @@ -236,7 +235,7 @@ public class SearchServiceTest String version = artifact.getVersion(); assertEquals( "http://localhost:" + port + "/repository/test-repo/org/apache/karaf/features/org.apache.karaf.features.core/" - + version + "/org.apache.karaf.features.core-" + version + ".bundle", artifact.getUrl() ); + + version + "/org.apache.karaf.features.core-" + version + ".jar", artifact.getUrl() ); }