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
This commit is contained in:
Olivier Lamy 2013-12-04 12:37:19 +00:00
parent 771b752199
commit 7c8d917eca
8 changed files with 21 additions and 27 deletions

View File

@ -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>

View File

@ -64,7 +64,7 @@
</dependency>
<dependency>
<groupId>org.easytesting</groupId>
<artifactId>fest-assert</artifactId>
<artifactId>fest-assert-core</artifactId>
<scope>test</scope>
</dependency>
<dependency>

View File

@ -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;

View File

@ -188,7 +188,7 @@
<dependency>
<groupId>org.easytesting</groupId>
<artifactId>fest-assert</artifactId>
<artifactId>fest-assert-core</artifactId>
<scope>test</scope>
</dependency>

View File

@ -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" );

View File

@ -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" );

View File

@ -49,7 +49,7 @@
</dependency>
<dependency>
<groupId>org.easytesting</groupId>
<artifactId>fest-assert</artifactId>
<artifactId>fest-assert-core</artifactId>
</dependency>
</dependencies>
</project>

View File

@ -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;