continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From car...@apache.org
Subject svn commit: r429342 - in /maven/continuum/branches/continuum-acegi/continuum-security/continuum-security-acegi/src/test/java/org/apache/maven/continuum/security/acegi/aspectj: AbstractMethodSecurityTest.java MethodSecurityPlexusTest.java
Date Mon, 07 Aug 2006 13:56:44 GMT
Author: carlos
Date: Mon Aug  7 06:56:43 2006
New Revision: 429342

URL: http://svn.apache.org/viewvc?rev=429342&view=rev
Log:
Use PlexusTestCase

Modified:
    maven/continuum/branches/continuum-acegi/continuum-security/continuum-security-acegi/src/test/java/org/apache/maven/continuum/security/acegi/aspectj/AbstractMethodSecurityTest.java
    maven/continuum/branches/continuum-acegi/continuum-security/continuum-security-acegi/src/test/java/org/apache/maven/continuum/security/acegi/aspectj/MethodSecurityPlexusTest.java

Modified: maven/continuum/branches/continuum-acegi/continuum-security/continuum-security-acegi/src/test/java/org/apache/maven/continuum/security/acegi/aspectj/AbstractMethodSecurityTest.java
URL: http://svn.apache.org/viewvc/maven/continuum/branches/continuum-acegi/continuum-security/continuum-security-acegi/src/test/java/org/apache/maven/continuum/security/acegi/aspectj/AbstractMethodSecurityTest.java?rev=429342&r1=429341&r2=429342&view=diff
==============================================================================
--- maven/continuum/branches/continuum-acegi/continuum-security/continuum-security-acegi/src/test/java/org/apache/maven/continuum/security/acegi/aspectj/AbstractMethodSecurityTest.java
(original)
+++ maven/continuum/branches/continuum-acegi/continuum-security/continuum-security-acegi/src/test/java/org/apache/maven/continuum/security/acegi/aspectj/AbstractMethodSecurityTest.java
Mon Aug  7 06:56:43 2006
@@ -16,8 +16,6 @@
  * limitations under the License.
  */
 
-import junit.framework.TestCase;
-
 import org.acegisecurity.AccessDecisionManager;
 import org.acegisecurity.AccessDeniedException;
 import org.acegisecurity.Authentication;
@@ -28,6 +26,7 @@
 import org.acegisecurity.providers.TestingAuthenticationToken;
 import org.apache.maven.continuum.Continuum;
 import org.apache.maven.continuum.model.project.Project;
+import org.codehaus.plexus.PlexusTestCase;
 
 /**
  * Test for {@link ContinuumSecurityAspect}
@@ -36,7 +35,7 @@
  * @version $Id$
  */
 public abstract class AbstractMethodSecurityTest
-    extends TestCase
+    extends PlexusTestCase
 {
     private Continuum continuum;
 

Modified: maven/continuum/branches/continuum-acegi/continuum-security/continuum-security-acegi/src/test/java/org/apache/maven/continuum/security/acegi/aspectj/MethodSecurityPlexusTest.java
URL: http://svn.apache.org/viewvc/maven/continuum/branches/continuum-acegi/continuum-security/continuum-security-acegi/src/test/java/org/apache/maven/continuum/security/acegi/aspectj/MethodSecurityPlexusTest.java?rev=429342&r1=429341&r2=429342&view=diff
==============================================================================
--- maven/continuum/branches/continuum-acegi/continuum-security/continuum-security-acegi/src/test/java/org/apache/maven/continuum/security/acegi/aspectj/MethodSecurityPlexusTest.java
(original)
+++ maven/continuum/branches/continuum-acegi/continuum-security/continuum-security-acegi/src/test/java/org/apache/maven/continuum/security/acegi/aspectj/MethodSecurityPlexusTest.java
Mon Aug  7 06:56:43 2006
@@ -16,35 +16,21 @@
  * limitations under the License.
  */
 
-import java.io.InputStream;
-import java.io.InputStreamReader;
-
 import org.acegisecurity.Authentication;
 import org.acegisecurity.GrantedAuthority;
 import org.acegisecurity.GrantedAuthorityImpl;
 import org.acegisecurity.providers.UsernamePasswordAuthenticationToken;
 import org.apache.maven.continuum.Continuum;
-import org.codehaus.plexus.DefaultPlexusContainer;
-import org.codehaus.plexus.PlexusContainer;
 
 public class MethodSecurityPlexusTest
     extends AbstractMethodSecurityTest
 {
 
-    private PlexusContainer pc;
-
     protected void setUp()
         throws Exception
     {
         super.setUp();
-        InputStream is = Thread.currentThread().getContextClassLoader()
-            .getResourceAsStream( "org/apache/maven/continuum/security/acegi/aspectj/MethodSecurityPlexusTest.xml"
);
-
-        pc = new DefaultPlexusContainer();
-        pc.setConfigurationResource( new InputStreamReader( is ) );
-        pc.initialize();
-        pc.start();
-        setContinuum( (Continuum) pc.lookup( "org.apache.maven.continuum.Continuum" ) );
+        setContinuum( (Continuum) lookup( "org.apache.maven.continuum.Continuum" ) );
     }
 
     protected Authentication getAuthentication( String role )
@@ -52,12 +38,5 @@
         return new UsernamePasswordAuthenticationToken( "marissa", "koala",
                                                         new GrantedAuthority[] { new GrantedAuthorityImpl(
"ROLE_"
                                                             + role ) } );
-    }
-
-    protected void tearDown()
-        throws Exception
-    {
-        pc.dispose();
-        super.tearDown();
     }
 }



Mime
View raw message