aboutsummaryrefslogtreecommitdiffstats
path: root/archiva-modules/archiva-web/archiva-security/src
diff options
context:
space:
mode:
authorOlivier Lamy <olamy@apache.org>2013-11-13 06:31:24 +0000
committerOlivier Lamy <olamy@apache.org>2013-11-13 06:31:24 +0000
commitab6f5bde33f4ab6899557733fac009497053952e (patch)
tree87f9bc0ff11f7429ffbead336649d57ece92e4ac /archiva-modules/archiva-web/archiva-security/src
parent16b6da8bf0942336143734e6992d3a81b3b977df (diff)
downloadarchiva-ab6f5bde33f4ab6899557733fac009497053952e.tar.gz
archiva-ab6f5bde33f4ab6899557733fac009497053952e.zip
move to last easymock 3.2
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1541399 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'archiva-modules/archiva-web/archiva-security/src')
-rw-r--r--archiva-modules/archiva-web/archiva-security/src/test/java/org/apache/archiva/security/ArchivaServletAuthenticatorTest.java18
1 files changed, 10 insertions, 8 deletions
diff --git a/archiva-modules/archiva-web/archiva-security/src/test/java/org/apache/archiva/security/ArchivaServletAuthenticatorTest.java b/archiva-modules/archiva-web/archiva-security/src/test/java/org/apache/archiva/security/ArchivaServletAuthenticatorTest.java
index baf48b2cf..3c63337ec 100644
--- a/archiva-modules/archiva-web/archiva-security/src/test/java/org/apache/archiva/security/ArchivaServletAuthenticatorTest.java
+++ b/archiva-modules/archiva-web/archiva-security/src/test/java/org/apache/archiva/security/ArchivaServletAuthenticatorTest.java
@@ -19,15 +19,16 @@ package org.apache.archiva.security;
* under the License.
*/
-import org.apache.archiva.redback.users.User;
-import org.apache.archiva.redback.users.UserManager;
-import org.apache.archiva.security.common.ArchivaRoleConstants;
import org.apache.archiva.redback.authentication.AuthenticationException;
import org.apache.archiva.redback.authentication.AuthenticationResult;
import org.apache.archiva.redback.authorization.UnauthorizedException;
import org.apache.archiva.redback.system.DefaultSecuritySession;
import org.apache.archiva.redback.system.SecuritySession;
-import org.easymock.MockControl;
+import org.apache.archiva.redback.users.User;
+import org.apache.archiva.redback.users.UserManager;
+import org.apache.archiva.security.common.ArchivaRoleConstants;
+import org.easymock.EasyMock;
+import org.easymock.IMocksControl;
import org.junit.Before;
import org.junit.Test;
@@ -45,7 +46,7 @@ public class ArchivaServletAuthenticatorTest
@Named( value = "servletAuthenticator#test" )
private ServletAuthenticator servletAuth;
- private MockControl httpServletRequestControl;
+ private IMocksControl httpServletRequestControl;
private HttpServletRequest request;
@@ -55,8 +56,8 @@ public class ArchivaServletAuthenticatorTest
{
super.setUp();
- httpServletRequestControl = MockControl.createControl( HttpServletRequest.class );
- request = (HttpServletRequest) httpServletRequestControl.getMock();
+ httpServletRequestControl = EasyMock.createControl( );
+ request = httpServletRequestControl.createMock( HttpServletRequest.class );
setupRepository( "corporate" );
}
@@ -123,7 +124,8 @@ public class ArchivaServletAuthenticatorTest
assignRepositoryObserverRole( USER_ALPACA, "corporate" );
- httpServletRequestControl.expectAndReturn( request.getRemoteAddr(), "192.168.111.111" );
+ //httpServletRequestControl.expectAndReturn( request.getRemoteAddr(), "192.168.111.111" );
+ EasyMock.expect( request.getRemoteAddr() ).andReturn( "192.168.111.111" );
UserManager userManager = securitySystem.getUserManager();
User user = userManager.findUser( USER_ALPACA );