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;
/**
* same search but with Guest user
+ *
* @throws Exception
*/
@Test
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 )
{
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() );
}