diff options
author | Olivier Lamy <olamy@apache.org> | 2011-09-28 21:33:56 +0000 |
---|---|---|
committer | Olivier Lamy <olamy@apache.org> | 2011-09-28 21:33:56 +0000 |
commit | 18b92bde1686b0e5000c7ec0c22e204743e44274 (patch) | |
tree | a322aaf5f0e66a0d4a04970a1955127adf7f50ad /archiva-modules/archiva-web | |
parent | 3323da7d3426c4b6af37a293a9ee28fe2935a7bb (diff) | |
download | archiva-18b92bde1686b0e5000c7ec0c22e204743e44274.tar.gz archiva-18b92bde1686b0e5000c7ec0c22e204743e44274.zip |
format : no code change
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1177068 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'archiva-modules/archiva-web')
3 files changed, 23 insertions, 25 deletions
diff --git a/archiva-modules/archiva-web/archiva-webapp/src/test/java/org/apache/archiva/web/action/BrowseActionTest.java b/archiva-modules/archiva-web/archiva-webapp/src/test/java/org/apache/archiva/web/action/BrowseActionTest.java index 97dfafd7e..7d9f45e30 100644 --- a/archiva-modules/archiva-web/archiva-webapp/src/test/java/org/apache/archiva/web/action/BrowseActionTest.java +++ b/archiva-modules/archiva-web/archiva-webapp/src/test/java/org/apache/archiva/web/action/BrowseActionTest.java @@ -48,9 +48,31 @@ public class BrowseActionTest private static final String OTHER_TEST_REPO = "other-repo"; + protected void setUp() + throws Exception + { + super.setUp(); + setObservableRepos( Lists.<String>newArrayList( "test-repo" ) ); + action = (BrowseAction) getActionProxy( "/browse.action" ).getAction(); + metadataResolver = new TestMetadataResolver(); + RepositorySession repositorySession = mock( RepositorySession.class ); + when( repositorySession.getResolver() ).thenReturn( metadataResolver ); + TestRepositorySessionFactory factory = + applicationContext.getBean( "repositorySessionFactory#test", TestRepositorySessionFactory.class ); + factory.setRepositorySession( repositorySession ); + } + + protected void tearDown() + throws Exception + { + super.tearDown(); + applicationContext.getBean( DefaultDownloadRemoteIndexScheduler.class ).shutdown(); + setObservableRepos( Lists.<String>newArrayList( "test-repo" ) ); + } + public void testInstantiation() { - assertFalse( action == (BrowseAction) getActionProxy( "/browse.action" ).getAction() ); + assertFalse( action == getActionProxy( "/browse.action" ).getAction() ); } public void testBrowse() @@ -389,26 +411,5 @@ public class BrowseActionTest assertNull( action.getSharedModel() ); } - protected void setUp() - throws Exception - { - super.setUp(); - setObservableRepos( Lists.<String>newArrayList( "test-repo" ) ); - //action = (BrowseAction) lookup( Action.class, ACTION_HINT ); - action = (BrowseAction) getActionProxy( "/browse.action" ).getAction(); - metadataResolver = new TestMetadataResolver(); - RepositorySession repositorySession = mock( RepositorySession.class ); - when( repositorySession.getResolver() ).thenReturn( metadataResolver ); - TestRepositorySessionFactory factory = - applicationContext.getBean( "repositorySessionFactory#test", TestRepositorySessionFactory.class ); - factory.setRepositorySession( repositorySession ); - } - protected void tearDown() - throws Exception - { - super.tearDown(); - applicationContext.getBean( DefaultDownloadRemoteIndexScheduler.class ).shutdown(); - setObservableRepos( Lists.<String>newArrayList( "test-repo" ) ); - } }
\ No newline at end of file diff --git a/archiva-modules/archiva-web/archiva-webdav/src/test/java/org/apache/archiva/webdav/AbstractRepositoryServletProxiedTestCase.java b/archiva-modules/archiva-web/archiva-webdav/src/test/java/org/apache/archiva/webdav/AbstractRepositoryServletProxiedTestCase.java index 1e3f704d0..ad79464b3 100644 --- a/archiva-modules/archiva-web/archiva-webdav/src/test/java/org/apache/archiva/webdav/AbstractRepositoryServletProxiedTestCase.java +++ b/archiva-modules/archiva-web/archiva-webdav/src/test/java/org/apache/archiva/webdav/AbstractRepositoryServletProxiedTestCase.java @@ -91,8 +91,6 @@ public abstract class AbstractRepositoryServletProxiedTestCase protected RemoteRepoInfo remoteSnapshots; - protected RemoteRepoInfo remotePrivateSnapshots; - @Before public void setUp() throws Exception diff --git a/archiva-modules/archiva-web/archiva-webdav/src/test/java/org/apache/archiva/webdav/AbstractRepositoryServletTestCase.java b/archiva-modules/archiva-web/archiva-webdav/src/test/java/org/apache/archiva/webdav/AbstractRepositoryServletTestCase.java index 2f9c3722f..db149f09a 100644 --- a/archiva-modules/archiva-web/archiva-webdav/src/test/java/org/apache/archiva/webdav/AbstractRepositoryServletTestCase.java +++ b/archiva-modules/archiva-web/archiva-webdav/src/test/java/org/apache/archiva/webdav/AbstractRepositoryServletTestCase.java @@ -52,7 +52,6 @@ import java.io.IOException; * @version $Id$ */ @RunWith( SpringJUnit4ClassRunner.class ) -//ContextConfiguration( locations = { "classpath*:/META-INF/spring-context.xml", "classpath*:/spring-context.xml" } ) @ContextConfiguration( locations = { "classpath*:/repository-servlet-simple.xml" } ) public abstract class AbstractRepositoryServletTestCase extends TestCase |