</dependency>
<dependency>
- <groupId>org.easytesting</groupId>
- <artifactId>fest-assert-core</artifactId>
+ <groupId>org.assertj</groupId>
+ <artifactId>assertj-core</artifactId>
<scope>test</scope>
</dependency>
import org.eclipse.jetty.servlet.DefaultServlet;
import org.eclipse.jetty.servlet.ServletContextHandler;
import org.eclipse.jetty.servlet.ServletHolder;
-import org.fest.assertions.api.Assertions;
+import static org.assertj.core.api.Assertions.assertThat;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
FlatSearchResponse response = nexusIndexer.searchFlat( rq );
log.info( "returned hit count:{}", response.getReturnedHitsCount() );
- Assertions.assertThat( response.getReturnedHitsCount() ).isEqualTo( 8 );
+ assertThat( response.getReturnedHitsCount() ).isEqualTo( 8 );
}
</dependency>
<dependency>
- <groupId>org.easytesting</groupId>
- <artifactId>fest-assert-core</artifactId>
+ <groupId>org.assertj</groupId>
+ <artifactId>assertj-core</artifactId>
<scope>test</scope>
</dependency>
import java.io.File;
import java.util.List;
-import static org.fest.assertions.api.Assertions.assertThat;
+import static org.assertj.core.api.Assertions.assertThat;
/**
* @author Olivier Lamy
import org.apache.archiva.rest.api.model.VersionsList;
import org.apache.archiva.rest.api.services.BrowseService;
import org.apache.cxf.jaxrs.client.WebClient;
-import org.fest.assertions.data.MapEntry;
+
+import org.assertj.core.data.MapEntry;
import org.junit.Test;
import javax.ws.rs.core.MediaType;
import java.util.List;
import java.util.Map;
-import static org.fest.assertions.api.Assertions.assertThat;
+import static org.assertj.core.api.Assertions.assertThat;
/**
* @author Olivier Lamy
import org.apache.archiva.maven2.model.Artifact;
import org.apache.archiva.rest.api.services.MergeRepositoriesService;
import org.apache.commons.io.FileUtils;
-import org.fest.assertions.api.Assertions;
+import static org.assertj.core.api.Assertions.assertThat;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
log.info( "conflicts: {}", artifactMetadatas );
- Assertions.assertThat( artifactMetadatas ).isNotNull().isNotEmpty().hasSize( 8 );
+ assertThat( artifactMetadatas ).isNotNull().isNotEmpty().hasSize( 8 );
}
import org.apache.archiva.rest.api.model.RBACManagerImplementationInformation;
import org.apache.archiva.rest.api.model.UserManagerImplementationInformation;
import org.apache.archiva.rest.api.services.RedbackRuntimeConfigurationService;
-import org.fest.assertions.api.Assertions;
+import static org.assertj.core.api.Assertions.assertThat;
import org.junit.Test;
import java.util.Arrays;
{
RedbackRuntimeConfigurationService service = getRedbackRuntimeConfigurationService();
List<UserManagerImplementationInformation> infos = service.getUserManagerImplementationInformations();
- Assertions.assertThat( infos ).isNotNull().isNotEmpty().contains(
+ assertThat( infos ).isNotNull().isNotEmpty().contains(
new UserManagerImplementationInformation( "jdo", null, false ) );
}
{
RedbackRuntimeConfigurationService service = getRedbackRuntimeConfigurationService();
List<RBACManagerImplementationInformation> infos = service.getRbacManagerImplementationInformations();
- Assertions.assertThat( infos ).isNotNull().isNotEmpty().contains(
+ assertThat( infos ).isNotNull().isNotEmpty().contains(
new RBACManagerImplementationInformation( "jdo", null, false ) );
}
import org.apache.archiva.rest.api.services.RepositoriesService;
import org.apache.commons.io.FileUtils;
import org.apache.cxf.jaxrs.client.ServerWebApplicationException;
-import org.fest.assertions.api.Assertions;
+import static org.assertj.core.api.Assertions.assertThat;
import org.junit.Test;
import java.io.File;
log.info( "artifacts: {}", artifacts );
- Assertions.assertThat( artifacts ).isNotNull().isNotEmpty().hasSize( 2 );
+ assertThat( artifacts ).isNotNull().isNotEmpty().hasSize( 2 );
VersionsList versionsList =
browseService.getVersionsList( "org.apache.karaf.features", "org.apache.karaf.features.core",
SOURCE_REPO_ID );
- Assertions.assertThat( versionsList.getVersions() ).isNotNull().isNotEmpty().hasSize( 2 );
+ assertThat( versionsList.getVersions() ).isNotNull().isNotEmpty().hasSize( 2 );
log.info( "artifacts.size: {}", artifacts.size() );
browseService.getArtifactDownloadInfos( "org.apache.karaf.features", "org.apache.karaf.features.core",
"2.2.2", SOURCE_REPO_ID );
- Assertions.assertThat( artifacts ).isNotNull().isEmpty();
+ assertThat( artifacts ).isNotNull().isEmpty();
versionsList = browseService.getVersionsList( "org.apache.karaf.features", "org.apache.karaf.features.core",
SOURCE_REPO_ID );
- Assertions.assertThat( versionsList.getVersions() ).isNotNull().isNotEmpty().hasSize( 1 );
+ assertThat( versionsList.getVersions() ).isNotNull().isNotEmpty().hasSize( 1 );
}
finally
log.info( "artifacts: {}", artifacts );
- Assertions.assertThat( artifacts ).isNotNull().isNotEmpty().hasSize( 2 );
+ assertThat( artifacts ).isNotNull().isNotEmpty().hasSize( 2 );
VersionsList versionsList =
browseService.getVersionsList( "org.apache.karaf.features", "org.apache.karaf.features.core",
SOURCE_REPO_ID );
- Assertions.assertThat( versionsList.getVersions() ).isNotNull().isNotEmpty().hasSize( 2 );
+ assertThat( versionsList.getVersions() ).isNotNull().isNotEmpty().hasSize( 2 );
log.info( "artifacts.size: {}", artifacts.size() );
browseService.getArtifactDownloadInfos( "org.apache.karaf.features", "org.apache.karaf.features.core",
"2.2.2", SOURCE_REPO_ID );
- Assertions.assertThat( artifacts ).isNotNull().isEmpty();
+ assertThat( artifacts ).isNotNull().isEmpty();
versionsList = browseService.getVersionsList( "org.apache.karaf.features", "org.apache.karaf.features.core",
SOURCE_REPO_ID );
- Assertions.assertThat( versionsList.getVersions() ).isNotNull().isNotEmpty().hasSize( 1 );
+ assertThat( versionsList.getVersions() ).isNotNull().isNotEmpty().hasSize( 1 );
}
finally
List<Artifact> artifacts =
browseService.getArtifactDownloadInfos( "commons-logging", "commons-logging", "1.0.1", SOURCE_REPO_ID );
- Assertions.assertThat( artifacts ).isNotNull().isNotEmpty().hasSize( 3 );
+ assertThat( artifacts ).isNotNull().isNotEmpty().hasSize( 3 );
VersionsList versionsList =
browseService.getVersionsList( "commons-logging", "commons-logging", SOURCE_REPO_ID );
- Assertions.assertThat( versionsList.getVersions() ).isNotNull().isNotEmpty().hasSize( 6 );
+ assertThat( versionsList.getVersions() ).isNotNull().isNotEmpty().hasSize( 6 );
log.info( "artifacts.size: {}", artifacts.size() );
log.info( "artifact: {}", artifacts );
- Assertions.assertThat( artifacts ).isNotNull().isNotEmpty().hasSize( 2 );
+ assertThat( artifacts ).isNotNull().isNotEmpty().hasSize( 2 );
versionsList = browseService.getVersionsList( "commons-logging", "commons-logging", SOURCE_REPO_ID );
log.info( "versionsList: {}", versionsList );
- Assertions.assertThat( versionsList.getVersions() ).isNotNull().isNotEmpty().hasSize( 6 );
+ assertThat( versionsList.getVersions() ).isNotNull().isNotEmpty().hasSize( 6 );
}
finally
log.info( "browseResult: {}", browseResult );
- Assertions.assertThat( browseResult.getBrowseResultEntries() ).isNotNull().isNotEmpty().contains(
+ assertThat( browseResult.getBrowseResultEntries() ).isNotNull().isNotEmpty().contains(
new BrowseResultEntry( "org.apache.karaf.features.org.apache.karaf.features.command", true ),
new BrowseResultEntry( "org.apache.karaf.features.org.apache.karaf.features.core", true ) );
assertNotNull( browseResult );
- Assertions.assertThat( browseResult.getBrowseResultEntries() ).isNotNull().isEmpty();
+ assertThat( browseResult.getBrowseResultEntries() ).isNotNull().isEmpty();
browseResult = browseService.browseGroupId( "org.apache.karaf", SOURCE_REPO_ID );
assertNotNull( browseResult );
- Assertions.assertThat( browseResult.getBrowseResultEntries() ).isNotNull().isEmpty();
+ assertThat( browseResult.getBrowseResultEntries() ).isNotNull().isEmpty();
log.info( "browseResult empty: {}", browseResult );
}
log.info( "artifacts: {}", artifacts );
- Assertions.assertThat( artifacts ).isNotNull().isNotEmpty().hasSize( 10 );
+ assertThat( artifacts ).isNotNull().isNotEmpty().hasSize( 10 );
File artifactFile = new File( targetRepo,
"org/apache/archiva/redback/components/spring-quartz/2.0-SNAPSHOT/spring-quartz-2.0-20120618.214127-1.jar" );
File artifactFilepom = new File( targetRepo,
"org/apache/archiva/redback/components/spring-quartz/2.0-SNAPSHOT/spring-quartz-2.0-20120618.214127-1.pom" );
- Assertions.assertThat( artifactFile ).exists();
- Assertions.assertThat( artifactFilemd5 ).exists();
- Assertions.assertThat( artifactFilepom ).exists();
+ assertThat( artifactFile ).exists();
+ assertThat( artifactFilemd5 ).exists();
+ assertThat( artifactFilepom ).exists();
// we delete only one snapshot
Artifact artifact =
log.info( "artifacts: {}", artifacts );
- Assertions.assertThat( artifacts ).isNotNull().isNotEmpty().hasSize( 8 );
+ assertThat( artifacts ).isNotNull().isNotEmpty().hasSize( 8 );
- Assertions.assertThat( artifactFile ).doesNotExist();
- Assertions.assertThat( artifactFilemd5 ).doesNotExist();
- Assertions.assertThat( artifactFilepom ).doesNotExist();
+ assertThat( artifactFile ).doesNotExist();
+ assertThat( artifactFilemd5 ).doesNotExist();
+ assertThat( artifactFilepom ).doesNotExist();
}
catch ( Exception e )
{
import org.apache.archiva.maven2.model.Artifact;
import org.apache.archiva.rest.api.model.SearchRequest;
import org.apache.archiva.rest.api.services.SearchService;
-import org.fest.assertions.api.Assertions;
+import static org.assertj.core.api.Assertions.assertThat;
import org.junit.Test;
import java.util.Arrays;
List<Artifact> artifacts = searchService.searchArtifacts( searchRequest );
- Assertions.assertThat( artifacts ).isNotNull().hasSize( 2 );
+ assertThat( artifacts ).isNotNull().hasSize( 2 );
for ( Artifact artifact : artifacts )
{
<scope>test</scope>
</dependency>
<dependency>
- <groupId>org.easytesting</groupId>
- <artifactId>fest-assert-core</artifactId>
+ <groupId>org.assertj</groupId>
+ <artifactId>assertj-core</artifactId>
<scope>test</scope>
</dependency>
<dependency>
import org.apache.archiva.rest.api.services.SearchService;
import org.apache.archiva.test.utils.ArchivaBlockJUnit4ClassRunner;
import org.apache.commons.io.FileUtils;
-import org.fest.assertions.api.Assertions;
+import static org.assertj.core.api.Assertions.assertThat;
import org.junit.After;
import org.junit.AfterClass;
import org.junit.BeforeClass;
request.setGroupId( "org.apache.felix" );
List<Artifact> artifacts = searchService.searchArtifacts( request );
- Assertions.assertThat( artifacts ).isNotNull().isNotEmpty().hasSize( 1 );
+ assertThat( artifacts ).isNotNull().isNotEmpty().hasSize( 1 );
}
}
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 static org.assertj.core.api.Assertions.assertThat;
import org.junit.After;
import org.junit.AfterClass;
import org.junit.BeforeClass;
request.setGroupId( "org.apache.felix" );
List<Artifact> artifacts = searchService.searchArtifacts( request );
- Assertions.assertThat( artifacts ).isNotNull().isNotEmpty().hasSize( 1 );
+ assertThat( artifacts ).isNotNull().isNotEmpty().hasSize( 1 );
}
}
import com.google.common.io.Files;
import org.apache.archiva.admin.model.beans.RemoteRepository;
-import org.apache.archiva.remotedownload.AbstractDownloadTest;
import org.apache.archiva.rest.api.services.RemoteRepositoriesService;
-import org.apache.catalina.startup.Tomcat;
import org.apache.commons.io.FileUtils;
import org.apache.cxf.jaxrs.client.WebClient;
import org.eclipse.jetty.server.Handler;
import org.eclipse.jetty.server.Server;
-import org.eclipse.jetty.server.handler.ContextHandler;
-import org.eclipse.jetty.server.handler.ContextHandlerCollection;
import org.eclipse.jetty.server.handler.DefaultHandler;
import org.eclipse.jetty.server.handler.HandlerList;
import org.eclipse.jetty.server.handler.ResourceHandler;
-import org.eclipse.jetty.servlet.DefaultServlet;
-import org.eclipse.jetty.servlet.ServletContextHandler;
-import org.eclipse.jetty.servlet.ServletHolder;
-import org.fest.assertions.api.Assertions;
import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.Test;
import java.io.File;
+import static org.assertj.core.api.Assertions.assertThat;
+
/**
* @author Olivier Lamy
*/
service.addRemoteRepository( repo );
- Assertions.assertThat( service.checkRemoteConnectivity( repo.getId() ) ).isTrue();
+ assertThat( service.checkRemoteConnectivity( repo.getId() ) ).isTrue();
}
finally
{
service.addRemoteRepository( repo );
- Assertions.assertThat( service.checkRemoteConnectivity( repo.getId() ) ).isTrue();
+ assertThat( service.checkRemoteConnectivity( repo.getId() ) ).isTrue();
}
finally
{
service.addRemoteRepository( repo );
- Assertions.assertThat( service.checkRemoteConnectivity( repo.getId() ) ).isFalse();
+ assertThat( service.checkRemoteConnectivity( repo.getId() ) ).isFalse();
}
finally
{
</dependency>
<dependency>
- <groupId>org.easytesting</groupId>
- <artifactId>fest-assert-core</artifactId>
+ <groupId>org.assertj</groupId>
+ <artifactId>assertj-core</artifactId>
<scope>test</scope>
</dependency>
import org.fluentlenium.adapter.FluentTest;
import org.fluentlenium.core.domain.FluentList;
import org.fluentlenium.core.domain.FluentWebElement;
-import static org.fest.assertions.Assertions.assertThat;
+import static org.assertj.core.api.Assertions.assertThat;
import org.junit.Test;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
<scope>test</scope>
</dependency>
<dependency>
- <groupId>org.easytesting</groupId>
- <artifactId>fest-assert-core</artifactId>
+ <groupId>org.assertj</groupId>
+ <artifactId>assertj-core</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
import org.eclipse.jetty.servlet.DefaultServlet;
import org.eclipse.jetty.servlet.ServletContextHandler;
import org.eclipse.jetty.servlet.ServletHolder;
-import org.fest.assertions.api.Assertions;
+import static org.assertj.core.api.Assertions.assertThat;
import org.junit.After;
import org.junit.Before;
WebClient client = newClient();
int status = client.getPage( remoteRepo.url ).getWebResponse().getStatusCode();
- Assertions.assertThat( status ).isEqualTo( HttpServletResponse.SC_OK );
+ assertThat( status ).isEqualTo( HttpServletResponse.SC_OK );
}
import com.gargoylesoftware.htmlunit.WebRequest;
import com.gargoylesoftware.htmlunit.WebResponse;
-import org.fest.assertions.api.Assertions;
+import static org.assertj.core.api.Assertions.assertThat;
import org.jsoup.Jsoup;
import org.jsoup.nodes.Document;
import org.jsoup.nodes.Element;
private void assertLinks( List<String> expectedLinks, Elements actualLinks )
{
- Assertions.assertThat( actualLinks ).hasSize( expectedLinks.size() );
+ assertThat( actualLinks ).hasSize( expectedLinks.size() );
for ( int i = 0; i < actualLinks.size(); i++ )
{
import org.apache.archiva.maven2.metadata.MavenMetadataReader;
import org.apache.archiva.model.ArchivaRepositoryMetadata;
import org.apache.commons.io.FileUtils;
-import org.fest.assertions.api.Assertions;
+import static org.assertj.core.api.Assertions.assertThat;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
WebResponse response = getServletUnitClient().getResponse( request );
assertResponseOK( response );
- Assertions.assertThat( response.getContentAsString() ).isEqualTo( "first" );
- //assertEquals( "Expected file contents", "first", response.getContentAsString() );
+ assertThat( response.getContentAsString() ).isEqualTo( "first" );
}
/*
WebResponse response = getServletUnitClient().getResponse( request );
assertResponseOK( response );
- //assertEquals( "Expected file contents", "last", response.getContentAsString() );
- Assertions.assertThat( response.getContentAsString() ).isEqualTo( "last" );
+
+ assertThat( response.getContentAsString() ).isEqualTo( "last" );
}
/*
ArchivaRepositoryMetadata metadata = MavenMetadataReader.read( returnedMetadata );
assertResponseOK( response );
- /*
- assertEquals( "Versions list size", 4, metadata.getAvailableVersions().size() );
- assertTrue( "Versions list contains version 1.0", metadata.getAvailableVersions().contains( "1.0" ) );
- assertTrue( "Versions list contains version 1.5", metadata.getAvailableVersions().contains( "1.5" ) );
- assertTrue( "Versions list contains version 2.0", metadata.getAvailableVersions().contains( "2.0" ) );
- assertTrue( "Versions list contains version 2.5", metadata.getAvailableVersions().contains( "2.5" ) );
- */
-
- Assertions.assertThat( metadata.getAvailableVersions() ).isNotNull()
+
+ assertThat( metadata.getAvailableVersions() ).isNotNull()
.hasSize( 4 ).contains( "1.0", "1.5", "2.0", "2.5" );
response = getServletUnitClient().getResource( request );
assertResponseOK( response );
- //assertEquals( "add113b0d7f8c6adb92a5015a7a3701081edf998 maven-metadata-group-with-valid-repos.xml",
- // response.getContentAsString() );
- Assertions.assertThat( response.getContentAsString() )
+ assertThat( response.getContentAsString() )
.isEqualTo( "add113b0d7f8c6adb92a5015a7a3701081edf998 maven-metadata-group-with-valid-repos.xml" );
// request the md5 checksum of the metadata
response = getServletUnitClient().getResource( request );
assertResponseOK( response );
- //assertEquals( "5b85ea4aa5f52bb76760041a52f98de8 maven-metadata-group-with-valid-repos.xml",
- // response.getContentAsString().trim() );
- Assertions.assertThat( response.getContentAsString() )
+ assertThat( response.getContentAsString() )
.isEqualTo( "5b85ea4aa5f52bb76760041a52f98de8 maven-metadata-group-with-valid-repos.xml" );
}
assertResponseOK( response );
- Assertions.assertThat( response.getContentAsString() ).contains( "Collection" )
+ assertThat( response.getContentAsString() ).contains( "Collection" )
.contains( "dummy/dummy-artifact" )
.contains( "1.0" )
.contains( "2.0" );
protected void assertResponseMethodNotAllowed( WebResponse response )
{
- //assertNotNull( "Should have recieved a response", response );
- Assertions.assertThat( response ).isNotNull();
- //assertEquals( "Should have been an 405/Method Not Allowed response code.",
- // HttpServletResponse.SC_METHOD_NOT_ALLOWED, response.getResponseCode() );
- Assertions.assertThat( response.getStatusCode() ).isEqualTo( HttpServletResponse.SC_METHOD_NOT_ALLOWED );
+
+ assertThat( response ).isNotNull();
+
+ assertThat( response.getStatusCode() ).isEqualTo( HttpServletResponse.SC_METHOD_NOT_ALLOWED );
}
protected RepositoryGroupConfiguration createRepositoryGroup( String id, List<String> repositories )
import org.apache.archiva.configuration.ArchivaConfiguration;
import org.apache.archiva.configuration.Configuration;
import org.apache.archiva.configuration.ManagedRepositoryConfiguration;
-import org.fest.assertions.api.Assertions;
import org.junit.Before;
import org.junit.Test;
import java.io.File;
+import static org.assertj.core.api.Assertions.assertThat;
+
/**
* RepositoryServletTest
*/
WebRequest request = new GetMethodWebRequest( path );
WebResponse response = getServletUnitClient().getResponse( request );
assertResponseNotFound( response );
- Assertions.assertThat( response.getContentAsString() ).contains(
+ assertThat( response.getContentAsString() ).contains(
"Invalid path to Artifact: legacy paths should have an expected type ending in [s] in the second part of the path." );
}
}
import junit.framework.TestCase;
import org.apache.archiva.test.utils.ArchivaBlockJUnit4ClassRunner;
-import org.fest.assertions.api.Assertions;
import org.junit.Test;
import org.junit.runner.RunWith;
+import static org.assertj.core.api.Assertions.assertThat;
/**
*/
public void testGetRepositoryId()
{
String href = "/path/to/my/resource";
- Assertions.assertThat( RepositoryPathUtil.getRepositoryName( href ) ).isEqualTo( "to" );
+ assertThat( RepositoryPathUtil.getRepositoryName( href ) ).isEqualTo( "to" );
href = "path/to/my/resource";
- Assertions.assertThat( RepositoryPathUtil.getRepositoryName( href ) ).isEqualTo( "to" );
+ assertThat( RepositoryPathUtil.getRepositoryName( href ) ).isEqualTo( "to" );
}
<artifactId>slf4j-api</artifactId>
</dependency>
<dependency>
- <groupId>org.easytesting</groupId>
- <artifactId>fest-assert-core</artifactId>
+ <groupId>org.assertj</groupId>
+ <artifactId>assertj-core</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
import org.apache.archiva.metadata.model.ProjectVersionMetadata;
import org.apache.archiva.metadata.model.Scm;
import org.apache.archiva.test.utils.ArchivaSpringJUnit4ClassRunner;
-import org.fest.util.Sets;
+import org.assertj.core.util.Sets;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.slf4j.Logger;
import java.util.Map;
import java.util.TimeZone;
-import static org.fest.assertions.api.Assertions.assertThat;
+import static org.assertj.core.api.Assertions.assertThat;
@RunWith(ArchivaSpringJUnit4ClassRunner.class)
@ContextConfiguration(locations = { "classpath*:/META-INF/spring-context.xml", "classpath*:/spring-context.xml" })
Collection<String> repositories = repository.getRepositories();
- assertEquals( "repository.getRepositories() -> " + repositories,
- Sets.newLinkedHashSet( TEST_REPO_ID, OTHER_REPO_ID ), new LinkedHashSet<String>( repositories ) );
+ assertEquals( "repository.getRepositories() -> " + repositories, //
+ Sets.newLinkedHashSet( TEST_REPO_ID, OTHER_REPO_ID ), //
+ new LinkedHashSet<String>( repositories ) ); //
}
@Test
<scope>test</scope>
</dependency>
<dependency>
- <groupId>org.easytesting</groupId>
- <artifactId>fest-assert-core</artifactId>
+ <groupId>org.assertj</groupId>
+ <artifactId>assertj-core</artifactId>
<scope>test</scope>
</dependency>
-
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-1.2-api</artifactId>
import org.apache.archiva.maven2.model.Artifact;
import org.apache.archiva.maven2.model.TreeEntry;
import org.apache.archiva.test.utils.ArchivaSpringJUnit4ClassRunner;
-import org.fest.assertions.api.Assertions;
+import static org.assertj.core.api.Assertions.assertThat;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
builder.buildDependencyTree( Collections.singletonList( TEST_REPO_ID ), TEST_GROUP_ID, TEST_ARTIFACT_ID,
TEST_VERSION );
- Assertions.assertThat( treeEntries ).isNotNull().isNotEmpty().contains(
+ assertThat( treeEntries ).isNotNull().isNotEmpty().contains(
new TreeEntry( new Artifact( TEST_GROUP_ID, TEST_ARTIFACT_ID, TEST_VERSION, "", "" ) ) );
- Assertions.assertThat( treeEntries.get( 0 ).getChilds() ).isNotNull().isNotEmpty().contains(
+ assertThat( treeEntries.get( 0 ).getChilds() ).isNotNull().isNotEmpty().contains(
new TreeEntry( new Artifact( "commons-lang", "commons-lang", "2.2", "compile", "" ) ) );
}
<scope>test</scope>
</dependency>
<dependency>
- <groupId>org.easytesting</groupId>
- <artifactId>fest-assert-core</artifactId>
+ <groupId>org.assertj</groupId>
+ <artifactId>assertj-core</artifactId>
<scope>test</scope>
</dependency>
<dependency>
import org.apache.archiva.metadata.repository.cassandra.model.Namespace;
import org.apache.archiva.metadata.repository.cassandra.model.Repository;
import org.apache.archiva.test.utils.ArchivaSpringJUnit4ClassRunner;
-import org.fest.assertions.api.Assertions;
+import static org.assertj.core.api.Assertions.assertThat;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
r = cmr.getRepository( "release" );
- Assertions.assertThat( r ).isNotNull();
+ assertThat( r ).isNotNull();
- Assertions.assertThat( cmr.getRepositories() ).isNotEmpty().hasSize( 1 );
- Assertions.assertThat( cmr.getNamespaces( "release" ) ).isNotEmpty().hasSize( 1 );
+ assertThat( cmr.getRepositories() ).isNotEmpty().hasSize( 1 );
+ assertThat( cmr.getNamespaces( "release" ) ).isNotEmpty().hasSize( 1 );
n = cmr.getNamespace( "release", "org" );
- Assertions.assertThat( n ).isNotNull();
- Assertions.assertThat( n.getRepository() ).isNotNull();
+ assertThat( n ).isNotNull();
+ assertThat( n.getRepository() ).isNotNull();
cmr.updateNamespace( "release", "org.apache" );
r = cmr.getRepository( "release" );
- Assertions.assertThat( r ).isNotNull();
- Assertions.assertThat( cmr.getNamespaces( "release" ) ).isNotEmpty().hasSize( 2 );
+ assertThat( r ).isNotNull();
+ assertThat( cmr.getNamespaces( "release" ) ).isNotEmpty().hasSize( 2 );
cmr.removeNamespace( "release", "org.apache" );
- Assertions.assertThat( cmr.getNamespaces( "release" ) ).isNotEmpty().hasSize( 1 );
- Assertions.assertThat( cmr.getNamespaces( "release" ) ).containsExactly( "org" );
+ assertThat( cmr.getNamespaces( "release" ) ).isNotEmpty().hasSize( 1 );
+ assertThat( cmr.getNamespaces( "release" ) ).containsExactly( "org" );
ProjectMetadata projectMetadata = new ProjectMetadata();
projectMetadata.setId( "theproject" );
cmr.updateProject( "release", projectMetadata );
- Assertions.assertThat( cmr.getProjects( "release", "org" ) ).isNotEmpty().hasSize( 1 ).containsExactly(
+ assertThat( cmr.getProjects( "release", "org" ) ).isNotEmpty().hasSize( 1 ).containsExactly(
"theproject" );
cmr.removeProject( "release", "org", "theproject" );
- Assertions.assertThat( cmr.getProjects( "release", "org" ) ).isEmpty();
+ assertThat( cmr.getProjects( "release", "org" ) ).isEmpty();
cmr.removeRepository( "release" );
r = cmr.getRepository( "release" );
- Assertions.assertThat( r ).isNull();
+ assertThat( r ).isNull();
}
catch ( Exception e )
<scope>test</scope>
</dependency>
<dependency>
- <groupId>org.easytesting</groupId>
- <artifactId>fest-assert-core</artifactId>
+ <groupId>org.assertj</groupId>
+ <artifactId>assertj-core</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<scope>test</scope>
</dependency>
<dependency>
- <groupId>org.easytesting</groupId>
- <artifactId>fest-assert-core</artifactId>
+ <groupId>org.assertj</groupId>
+ <artifactId>assertj-core</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<scope>test</scope>
</dependency>
<dependency>
- <groupId>org.easytesting</groupId>
- <artifactId>fest-assert-core</artifactId>
- <version>2.0M9</version>
+ <groupId>org.assertj</groupId>
+ <artifactId>assertj-core</artifactId>
+ <version>1.6.0</version>
<scope>test</scope>
</dependency>
<dependency>