more compact with fest-assert

git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1439826 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Olivier Lamy 2013-01-29 10:52:46 +00:00
parent 9de15a459f
commit ca47bd3b99
2 changed files with 10 additions and 3 deletions

View File

@ -396,6 +396,11 @@
<version>${tomcat7Version}</version> <version>${tomcat7Version}</version>
<scope>provided</scope> <scope>provided</scope>
</dependency> </dependency>
<dependency>
<groupId>org.easytesting</groupId>
<artifactId>fest-assert-core</artifactId>
<scope>test</scope>
</dependency>
</dependencies> </dependencies>

View File

@ -32,6 +32,7 @@ import org.apache.archiva.rest.api.services.SearchService;
import org.apache.commons.io.FileUtils; import org.apache.commons.io.FileUtils;
import org.apache.archiva.redback.integration.security.role.RedbackRoleConstants; import org.apache.archiva.redback.integration.security.role.RedbackRoleConstants;
import org.apache.archiva.redback.rest.services.FakeCreateAdminService; import org.apache.archiva.redback.rest.services.FakeCreateAdminService;
import org.fest.assertions.api.Assertions;
import org.junit.After; import org.junit.After;
import org.junit.AfterClass; import org.junit.AfterClass;
import org.junit.BeforeClass; import org.junit.BeforeClass;
@ -41,12 +42,13 @@ import org.junit.runner.RunWith;
import java.io.File; import java.io.File;
import java.util.Arrays; import java.util.Arrays;
import java.util.List; import java.util.List;
import org.apache.archiva.test.utils.ArchivaBlockJUnit4ClassRunner; import org.apache.archiva.test.utils.ArchivaBlockJUnit4ClassRunner;
/** /**
* @author Olivier Lamy * @author Olivier Lamy
*/ */
@RunWith( ArchivaBlockJUnit4ClassRunner.class ) @RunWith(ArchivaBlockJUnit4ClassRunner.class)
public class DownloadMergedIndexTest public class DownloadMergedIndexTest
extends AbstractDownloadTest extends AbstractDownloadTest
{ {
@ -177,7 +179,7 @@ public class DownloadMergedIndexTest
request.setGroupId( "org.apache.felix" ); request.setGroupId( "org.apache.felix" );
List<Artifact> artifacts = searchService.searchArtifacts( request ); List<Artifact> artifacts = searchService.searchArtifacts( request );
assertFalse( artifacts.isEmpty() ); Assertions.assertThat( artifacts ).isNotNull().isNotEmpty().hasSize( 1 );
assertEquals( 1, artifacts.size() );
} }
} }