]> source.dussan.org Git - archiva.git/commitdiff
more compact with fest-assert
authorOlivier Lamy <olamy@apache.org>
Tue, 29 Jan 2013 10:52:46 +0000 (10:52 +0000)
committerOlivier Lamy <olamy@apache.org>
Tue, 29 Jan 2013 10:52:46 +0000 (10:52 +0000)
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1439826 13f79535-47bb-0310-9956-ffa450edef68

archiva-modules/archiva-web/archiva-web-common/pom.xml
archiva-modules/archiva-web/archiva-web-common/src/test/java/org/apache/archiva/DownloadMergedIndexTest.java

index 728443c9f6af4265a022995f55d3af10387e5785..c58e972b24f69bbb64bf93ee82c3c8b51c14a482 100644 (file)
       <version>${tomcat7Version}</version>
       <scope>provided</scope>
     </dependency>
+    <dependency>
+      <groupId>org.easytesting</groupId>
+      <artifactId>fest-assert-core</artifactId>
+      <scope>test</scope>
+    </dependency>
 
 
   </dependencies>
index 3d24a30df470b2c7307401f16e8edd7caca5f934..f342ee149cba4098a847c7d9ad16d0fc5bd50d15 100644 (file)
@@ -32,6 +32,7 @@ import org.apache.archiva.rest.api.services.SearchService;
 import org.apache.commons.io.FileUtils;
 import org.apache.archiva.redback.integration.security.role.RedbackRoleConstants;
 import org.apache.archiva.redback.rest.services.FakeCreateAdminService;
+import org.fest.assertions.api.Assertions;
 import org.junit.After;
 import org.junit.AfterClass;
 import org.junit.BeforeClass;
@@ -41,12 +42,13 @@ import org.junit.runner.RunWith;
 import java.io.File;
 import java.util.Arrays;
 import java.util.List;
+
 import org.apache.archiva.test.utils.ArchivaBlockJUnit4ClassRunner;
 
 /**
  * @author Olivier Lamy
  */
-@RunWith( ArchivaBlockJUnit4ClassRunner.class )
+@RunWith(ArchivaBlockJUnit4ClassRunner.class)
 public class DownloadMergedIndexTest
     extends AbstractDownloadTest
 {
@@ -177,7 +179,7 @@ public class DownloadMergedIndexTest
         request.setGroupId( "org.apache.felix" );
 
         List<Artifact> artifacts = searchService.searchArtifacts( request );
-        assertFalse( artifacts.isEmpty() );
-        assertEquals( 1, artifacts.size() );
+        Assertions.assertThat( artifacts ).isNotNull().isNotEmpty().hasSize( 1 );
+
     }
 }