]> source.dussan.org Git - archiva.git/blob
e0e93b403f3acb7972037b99ed5921b1f7d83811
[archiva.git] /
1 package org.apache.maven.archiva.web.action.admin.appearance;
2
3 import org.apache.maven.archiva.configuration.ArchivaConfiguration;
4 import org.apache.maven.archiva.configuration.Configuration;
5 import org.apache.maven.archiva.web.action.AbstractWebworkTestCase;
6 import org.easymock.MockControl;
7
8 /**
9  */
10 public abstract class AbstractOrganizationInfoActionTest extends AbstractWebworkTestCase
11 {
12     protected MockControl archivaConfigurationControl;
13     
14     protected ArchivaConfiguration configuration;
15     
16     protected AbstractAppearanceAction action;
17     
18     protected Configuration config;
19     
20     protected abstract AbstractAppearanceAction getAction();
21
22     @Override
23     protected void setUp()
24         throws Exception
25     {
26         super.setUp();
27         
28         config = new Configuration();
29         archivaConfigurationControl = MockControl.createControl( ArchivaConfiguration.class );
30         configuration = (ArchivaConfiguration) archivaConfigurationControl.getMock();
31         
32         configuration.getConfiguration();
33         archivaConfigurationControl.setReturnValue(config, 1, 2);
34         
35         configuration.save(config);
36         archivaConfigurationControl.setVoidCallable(1, 2);
37         
38         archivaConfigurationControl.replay();
39     }
40     
41     protected void reloadAction()
42     {
43         action = getAction();
44         action.setConfiguration( configuration );
45     }
46 }