diff options
author | Brett Porter <brett@apache.org> | 2009-03-09 13:17:46 +0000 |
---|---|---|
committer | Brett Porter <brett@apache.org> | 2009-03-09 13:17:46 +0000 |
commit | 5a9d510e8aae6d86e7c5be8132e81fafb92c09a6 (patch) | |
tree | 5b81f27a2071ae408b825ece3014f1bc0114207e /archiva-modules/archiva-web/archiva-webapp/src/test | |
parent | 9633f8d28817191e8c2d6c622794ea24ebcda30e (diff) | |
download | archiva-5a9d510e8aae6d86e7c5be8132e81fafb92c09a6.tar.gz archiva-5a9d510e8aae6d86e7c5be8132e81fafb92c09a6.zip |
[MRM-1082] restore per-lookup to action classes that was set by default with the previous version of the plexus plugin. This is important for actions that store state and resolves a number of issues with parameters persisting across requests (and clients)
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@751672 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'archiva-modules/archiva-web/archiva-webapp/src/test')
-rw-r--r-- | archiva-modules/archiva-web/archiva-webapp/src/test/java/org/apache/maven/archiva/security/UserRepositoriesStub.java (renamed from archiva-modules/archiva-web/archiva-webapp/src/test/java/org/apache/maven/archiva/web/rss/UserRepositoriesStub.java) | 2 | ||||
-rw-r--r-- | archiva-modules/archiva-web/archiva-webapp/src/test/java/org/apache/maven/archiva/web/action/ShowArtifactActionTest.java | 33 | ||||
-rw-r--r-- | archiva-modules/archiva-web/archiva-webapp/src/test/resources/org/apache/maven/archiva/web/action/ShowArtifactActionTest.xml | 44 | ||||
-rw-r--r-- | archiva-modules/archiva-web/archiva-webapp/src/test/resources/org/apache/maven/archiva/web/rss/RssFeedServletTest.xml | 2 |
4 files changed, 79 insertions, 2 deletions
diff --git a/archiva-modules/archiva-web/archiva-webapp/src/test/java/org/apache/maven/archiva/web/rss/UserRepositoriesStub.java b/archiva-modules/archiva-web/archiva-webapp/src/test/java/org/apache/maven/archiva/security/UserRepositoriesStub.java index 6682236cd..43f43652e 100644 --- a/archiva-modules/archiva-web/archiva-webapp/src/test/java/org/apache/maven/archiva/web/rss/UserRepositoriesStub.java +++ b/archiva-modules/archiva-web/archiva-webapp/src/test/java/org/apache/maven/archiva/security/UserRepositoriesStub.java @@ -1,4 +1,4 @@ -package org.apache.maven.archiva.web.rss; +package org.apache.maven.archiva.security; /* * Licensed to the Apache Software Foundation (ASF) under one diff --git a/archiva-modules/archiva-web/archiva-webapp/src/test/java/org/apache/maven/archiva/web/action/ShowArtifactActionTest.java b/archiva-modules/archiva-web/archiva-webapp/src/test/java/org/apache/maven/archiva/web/action/ShowArtifactActionTest.java new file mode 100644 index 000000000..ba4344eb9 --- /dev/null +++ b/archiva-modules/archiva-web/archiva-webapp/src/test/java/org/apache/maven/archiva/web/action/ShowArtifactActionTest.java @@ -0,0 +1,33 @@ +package org.apache.maven.archiva.web.action; + +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +import org.codehaus.plexus.spring.PlexusInSpringTestCase; + +import com.opensymphony.xwork2.Action; + +public class ShowArtifactActionTest + extends PlexusInSpringTestCase +{ + public void testInstantiation() + { + assertFalse( lookup( Action.class, "showArtifactAction" ) == lookup( Action.class, "showArtifactAction" ) ); + } +} diff --git a/archiva-modules/archiva-web/archiva-webapp/src/test/resources/org/apache/maven/archiva/web/action/ShowArtifactActionTest.xml b/archiva-modules/archiva-web/archiva-webapp/src/test/resources/org/apache/maven/archiva/web/action/ShowArtifactActionTest.xml new file mode 100644 index 000000000..81c5b43b6 --- /dev/null +++ b/archiva-modules/archiva-web/archiva-webapp/src/test/resources/org/apache/maven/archiva/web/action/ShowArtifactActionTest.xml @@ -0,0 +1,44 @@ +<!-- + ~ Licensed to the Apache Software Foundation (ASF) under one + ~ or more contributor license agreements. See the NOTICE file + ~ distributed with this work for additional information + ~ regarding copyright ownership. The ASF licenses this file + ~ to you under the Apache License, Version 2.0 (the + ~ "License"); you may not use this file except in compliance + ~ with the License. You may obtain a copy of the License at + ~ + ~ http://www.apache.org/licenses/LICENSE-2.0 + ~ + ~ Unless required by applicable law or agreed to in writing, + ~ software distributed under the License is distributed on an + ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + ~ KIND, either express or implied. See the License for the + ~ specific language governing permissions and limitations + ~ under the License. + --> + +<plexus> + <components> + <component> + <role>org.codehaus.plexus.logging.LoggerManager</role> + <implementation>org.codehaus.plexus.logging.slf4j.Slf4jLoggerManager</implementation> + <lifecycle-handler>basic</lifecycle-handler> + </component> + <component> + <role>org.apache.maven.archiva.database.ArchivaDAO</role> + <role-hint>jdo</role-hint> + <implementation>org.apache.maven.archiva.web.action.admin.repositories.ArchivaDAOStub</implementation> + <requirements> + <requirement> + <role>org.apache.maven.archiva.configuration.ArchivaConfiguration</role> + <field-name>configuration</field-name> + </requirement> + </requirements> + </component> + <component> + <role>org.apache.maven.archiva.security.UserRepositories</role> + <role-hint>default</role-hint> + <implementation>org.apache.maven.archiva.security.UserRepositoriesStub</implementation> + </component> + </components> +</plexus> diff --git a/archiva-modules/archiva-web/archiva-webapp/src/test/resources/org/apache/maven/archiva/web/rss/RssFeedServletTest.xml b/archiva-modules/archiva-web/archiva-webapp/src/test/resources/org/apache/maven/archiva/web/rss/RssFeedServletTest.xml index 138ffec62..33988de51 100644 --- a/archiva-modules/archiva-web/archiva-webapp/src/test/resources/org/apache/maven/archiva/web/rss/RssFeedServletTest.xml +++ b/archiva-modules/archiva-web/archiva-webapp/src/test/resources/org/apache/maven/archiva/web/rss/RssFeedServletTest.xml @@ -44,7 +44,7 @@ <component> <role>org.apache.maven.archiva.security.UserRepositories</role> <role-hint>default</role-hint> - <implementation>org.apache.maven.archiva.web.rss.UserRepositoriesStub</implementation> + <implementation>org.apache.maven.archiva.security.UserRepositoriesStub</implementation> </component> </components> </plexus> |