diff options
author | Olivier Lamy <olamy@apache.org> | 2013-12-04 12:37:19 +0000 |
---|---|---|
committer | Olivier Lamy <olamy@apache.org> | 2013-12-04 12:37:19 +0000 |
commit | 7c8d917ecac559995a745b4209aa4e7385b79fd1 (patch) | |
tree | 03db804e9e1a6fa4347111a412f70e95d4c51de7 | |
parent | 771b7521992e8bf7c4301406e9441c0c32dae35f (diff) | |
download | archiva-7c8d917ecac559995a745b4209aa4e7385b79fd1.tar.gz archiva-7c8d917ecac559995a745b4209aa4e7385b79fd1.zip |
use last fest-assert version
git-svn-id: https://svn.apache.org/repos/asf/archiva/redback/redback-core/trunk@1547789 13f79535-47bb-0310-9956-ffa450edef68
8 files changed, 21 insertions, 27 deletions
@@ -663,8 +663,8 @@ </dependency> <dependency> <groupId>org.easytesting</groupId> - <artifactId>fest-assert</artifactId> - <version>1.4</version> + <artifactId>fest-assert-core</artifactId> + <version>2.0M9</version> </dependency> </dependencies> </dependencyManagement> diff --git a/redback-common/redback-common-ldap/pom.xml b/redback-common/redback-common-ldap/pom.xml index 5c31d50fe..248e38eea 100644 --- a/redback-common/redback-common-ldap/pom.xml +++ b/redback-common/redback-common-ldap/pom.xml @@ -64,7 +64,7 @@ </dependency> <dependency> <groupId>org.easytesting</groupId> - <artifactId>fest-assert</artifactId> + <artifactId>fest-assert-core</artifactId> <scope>test</scope> </dependency> <dependency> diff --git a/redback-common/redback-common-ldap/src/test/java/org/apache/archiva/redback/common/ldap/role/TestLdapRoleMapper.java b/redback-common/redback-common-ldap/src/test/java/org/apache/archiva/redback/common/ldap/role/TestLdapRoleMapper.java index 7838373d6..226406ab7 100644 --- a/redback-common/redback-common-ldap/src/test/java/org/apache/archiva/redback/common/ldap/role/TestLdapRoleMapper.java +++ b/redback-common/redback-common-ldap/src/test/java/org/apache/archiva/redback/common/ldap/role/TestLdapRoleMapper.java @@ -25,7 +25,7 @@ import org.apache.archiva.redback.common.ldap.connection.LdapConnectionFactory; import org.apache.archiva.redback.components.apacheds.ApacheDs; import org.apache.archiva.redback.policy.PasswordEncoder; import org.apache.archiva.redback.policy.encoders.SHA1PasswordEncoder; -import org.fest.assertions.Assertions; +import org.fest.assertions.api.Assertions; import org.junit.After; import org.junit.Before; import org.junit.Test; diff --git a/redback-integrations/redback-rest/redback-rest-services/pom.xml b/redback-integrations/redback-rest/redback-rest-services/pom.xml index d38c4d45c..378ae62f5 100644 --- a/redback-integrations/redback-rest/redback-rest-services/pom.xml +++ b/redback-integrations/redback-rest/redback-rest-services/pom.xml @@ -188,7 +188,7 @@ <dependency> <groupId>org.easytesting</groupId> - <artifactId>fest-assert</artifactId> + <artifactId>fest-assert-core</artifactId> <scope>test</scope> </dependency> diff --git a/redback-integrations/redback-rest/redback-rest-services/src/test/java/org/apache/archiva/redback/rest/services/LdapGroupMappingServiceTest.java b/redback-integrations/redback-rest/redback-rest-services/src/test/java/org/apache/archiva/redback/rest/services/LdapGroupMappingServiceTest.java index 4a85b41d6..8590cd1d7 100644 --- a/redback-integrations/redback-rest/redback-rest-services/src/test/java/org/apache/archiva/redback/rest/services/LdapGroupMappingServiceTest.java +++ b/redback-integrations/redback-rest/redback-rest-services/src/test/java/org/apache/archiva/redback/rest/services/LdapGroupMappingServiceTest.java @@ -23,8 +23,8 @@ import org.apache.archiva.redback.rest.api.model.LdapGroupMapping; import org.apache.archiva.redback.rest.api.services.LdapGroupMappingService; import org.apache.archiva.redback.rest.api.services.RedbackServiceException; import org.apache.commons.lang.StringUtils; -import org.fest.assertions.Assertions; -import org.fest.assertions.Condition; +import org.fest.assertions.api.Assertions; +import org.fest.assertions.core.Condition; import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.test.annotation.DirtiesContext; @@ -167,7 +167,7 @@ public class LdapGroupMappingServiceTest List<String> allGroups = service.getLdapGroups().getStrings(); - Assertions.assertThat( allGroups ).isNotNull().isNotEmpty().hasSize( 3 ).contains( groups.toArray() ); + Assertions.assertThat( allGroups ).isNotNull().isNotEmpty().hasSize( 3 ).containsAll( groups ); } catch ( Exception e ) { @@ -213,16 +213,11 @@ public class LdapGroupMappingServiceTest mappings = service.getLdapGroupMappings(); - Assertions.assertThat( mappings ).isNotNull().isNotEmpty().hasSize( 4 ).satisfies( new Condition<List<?>>() - { - @Override - public boolean matches( List<?> objects ) + Assertions.assertThat( mappings ).isNotNull().isNotEmpty().hasSize( 4 ).are( + new Condition<LdapGroupMapping>() { - boolean res = false; - - List<LdapGroupMapping> mappingList = (List<LdapGroupMapping>) objects; - - for ( LdapGroupMapping mapping : mappingList ) + @Override + public boolean matches( LdapGroupMapping mapping ) { if ( StringUtils.equals( "ldap group", mapping.getGroup() ) ) { @@ -230,11 +225,10 @@ public class LdapGroupMappingServiceTest "redback role" ); return true; } - } - return res; - } - } ); + return true; + } + } ); service.removeLdapGroupMapping( "ldap group" ); diff --git a/redback-integrations/redback-rest/redback-rest-services/src/test/java/org/apache/archiva/redback/rest/services/UserServiceTest.java b/redback-integrations/redback-rest/redback-rest-services/src/test/java/org/apache/archiva/redback/rest/services/UserServiceTest.java index 6dc93799f..f080710fa 100644 --- a/redback-integrations/redback-rest/redback-rest-services/src/test/java/org/apache/archiva/redback/rest/services/UserServiceTest.java +++ b/redback-integrations/redback-rest/redback-rest-services/src/test/java/org/apache/archiva/redback/rest/services/UserServiceTest.java @@ -31,6 +31,7 @@ import org.apache.archiva.redback.rest.services.mock.ServicesAssert; import org.apache.cxf.jaxrs.client.JAXRSClientFactory; import org.apache.cxf.jaxrs.client.ServerWebApplicationException; import org.apache.cxf.jaxrs.client.WebClient; +import org.fest.assertions.api.Assertions; import org.junit.Test; import javax.ws.rs.core.MediaType; @@ -38,7 +39,6 @@ import java.util.Collection; import java.util.Collections; import java.util.List; -import static org.fest.assertions.Assertions.assertThat; /** * @author Olivier Lamy @@ -152,7 +152,7 @@ public class UserServiceTest log.info( "messageContent: {}", messageContent ); - assertThat( messageContent ).contains( "Use the following URL to validate your account." ).contains( + Assertions.assertThat( messageContent ).contains( "Use the following URL to validate your account." ).contains( "http://wine.fr/bordeaux" ).containsIgnoringCase( "toto" ); assertTrue( service.validateUserFromKey( key ) ); @@ -211,7 +211,7 @@ public class UserServiceTest log.info( "messageContent: {}", messageContent ); - assertThat( messageContent ).contains( "Use the following URL to validate your account." ).contains( + Assertions.assertThat( messageContent ).contains( "Use the following URL to validate your account." ).contains( "http://localhost:" + port ).containsIgnoringCase( "toto" ); assertTrue( service.validateUserFromKey( key ) ); @@ -292,7 +292,7 @@ public class UserServiceTest String messageContent = emailMessages.get( 1 ).getText(); - assertThat( messageContent ).contains( "Password Reset" ).contains( "Username: toto" ).contains( + Assertions.assertThat( messageContent ).contains( "Password Reset" ).contains( "Username: toto" ).contains( "http://foo.fr/bar" ); diff --git a/redback-rbac/redback-rbac-tests/pom.xml b/redback-rbac/redback-rbac-tests/pom.xml index ba53007e1..668a368b3 100644 --- a/redback-rbac/redback-rbac-tests/pom.xml +++ b/redback-rbac/redback-rbac-tests/pom.xml @@ -49,7 +49,7 @@ </dependency> <dependency> <groupId>org.easytesting</groupId> - <artifactId>fest-assert</artifactId> + <artifactId>fest-assert-core</artifactId> </dependency> </dependencies> </project> diff --git a/redback-rbac/redback-rbac-tests/src/main/java/org/apache/archiva/redback/tests/AbstractRbacManagerTestCase.java b/redback-rbac/redback-rbac-tests/src/main/java/org/apache/archiva/redback/tests/AbstractRbacManagerTestCase.java index 9d5162db2..3e265fe56 100644 --- a/redback-rbac/redback-rbac-tests/src/main/java/org/apache/archiva/redback/tests/AbstractRbacManagerTestCase.java +++ b/redback-rbac/redback-rbac-tests/src/main/java/org/apache/archiva/redback/tests/AbstractRbacManagerTestCase.java @@ -16,7 +16,6 @@ package org.apache.archiva.redback.tests; * limitations under the License. */ -import org.fest.assertions.Assertions; import junit.framework.TestCase; import org.apache.archiva.redback.rbac.Operation; import org.apache.archiva.redback.rbac.RBACManager; @@ -27,6 +26,7 @@ import org.apache.archiva.redback.rbac.UserAssignment; import org.apache.archiva.redback.rbac.Permission; import org.apache.archiva.redback.rbac.RbacPermanentException; import org.apache.archiva.redback.tests.utils.RBACDefaults; +import org.fest.assertions.api.Assertions; import org.junit.Test; import org.junit.runner.RunWith; import org.slf4j.Logger; |