]> source.dussan.org Git - archiva.git/commitdiff
fix junit
authorOlivier Lamy <olamy@apache.org>
Sat, 2 Jun 2012 21:41:16 +0000 (21:41 +0000)
committerOlivier Lamy <olamy@apache.org>
Sat, 2 Jun 2012 21:41:16 +0000 (21:41 +0000)
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1345591 13f79535-47bb-0310-9956-ffa450edef68

archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/test/java/org/apache/archiva/rest/services/SearchServiceTest.java

index cb75bce99e1c72f3f31b58110b4ff29864f2ec6c..81183f43243ea04d286f830bf87e6866daf7766f 100644 (file)
@@ -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<Artifact> 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() );
 
 
         }