From 18b92bde1686b0e5000c7ec0c22e204743e44274 Mon Sep 17 00:00:00 2001 From: Olivier Lamy Date: Wed, 28 Sep 2011 21:33:56 +0000 Subject: [PATCH] format : no code change git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1177068 13f79535-47bb-0310-9956-ffa450edef68 --- .../archiva/web/action/BrowseActionTest.java | 45 ++++++++++--------- ...tractRepositoryServletProxiedTestCase.java | 2 - .../AbstractRepositoryServletTestCase.java | 1 - 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.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.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.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.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 -- 2.39.5